mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-01 07:37:04 +00:00
refactor: Use IntegrationTestCase in multiple files
Signed-off-by: David <dgx.arnold@gmail.com>
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
from erpnext.projects.doctype.activity_cost.activity_cost import DuplicationError
|
||||
|
||||
|
||||
class TestActivityCost(unittest.TestCase):
|
||||
class TestActivityCost(IntegrationTestCase):
|
||||
def test_duplication(self):
|
||||
frappe.db.sql("delete from `tabActivity Cost`")
|
||||
activity_cost1 = frappe.new_doc("Activity Cost")
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
from erpnext.projects.doctype.task.test_task import create_task
|
||||
|
||||
|
||||
class TestProjectTemplate(unittest.TestCase):
|
||||
class TestProjectTemplate(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestProjectType(unittest.TestCase):
|
||||
|
||||
class TestProjectType(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
|
||||
class TestProjectUpdate(unittest.TestCase):
|
||||
class TestProjectUpdate(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestProjectsSettings(unittest.TestCase):
|
||||
|
||||
class TestProjectsSettings(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import add_days, getdate, nowdate
|
||||
|
||||
from erpnext.projects.doctype.task.task import CircularReferenceError
|
||||
|
||||
|
||||
class TestTask(unittest.TestCase):
|
||||
class TestTask(IntegrationTestCase):
|
||||
def test_circular_reference(self):
|
||||
task1 = create_task("_Test Task 1", add_days(nowdate(), -15), add_days(nowdate(), -10))
|
||||
task2 = create_task("_Test Task 2", add_days(nowdate(), 11), add_days(nowdate(), 15), task1.name)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestTaskType(unittest.TestCase):
|
||||
|
||||
class TestTaskType(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import datetime
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import add_to_date, now_datetime, nowdate
|
||||
|
||||
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
|
||||
@@ -12,7 +12,7 @@ from erpnext.projects.doctype.timesheet.timesheet import OverlapError, make_sale
|
||||
from erpnext.setup.doctype.employee.test_employee import make_employee
|
||||
|
||||
|
||||
class TestTimesheet(unittest.TestCase):
|
||||
class TestTimesheet(IntegrationTestCase):
|
||||
def setUp(self):
|
||||
frappe.db.delete("Timesheet")
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import add_days, add_months, nowdate
|
||||
|
||||
from erpnext.projects.doctype.task.test_task import create_task
|
||||
from erpnext.projects.report.delayed_tasks_summary.delayed_tasks_summary import execute
|
||||
|
||||
|
||||
class TestDelayedTasksSummary(unittest.TestCase):
|
||||
class TestDelayedTasksSummary(IntegrationTestCase):
|
||||
@classmethod
|
||||
def setUp(self):
|
||||
task1 = create_task("_Test Task 98", add_days(nowdate(), -10), nowdate())
|
||||
|
||||
Reference in New Issue
Block a user