refactor: replace IntegrationTestCase with ERPNextTestCase repo-wide

- import ERPNextTestSuite
 - use it on test class
This commit is contained in:
ruthra kumar
2026-01-20 10:12:06 +05:30
parent 4027b82714
commit 33f4791698
320 changed files with 854 additions and 833 deletions

View File

@@ -2,12 +2,12 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase
from erpnext.projects.doctype.task.test_task import create_task
from erpnext.tests.utils import ERPNextTestSuite
class TestProjectTemplate(IntegrationTestCase):
class TestProjectTemplate(ERPNextTestSuite):
pass

View File

@@ -1,8 +1,8 @@
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestProjectType(IntegrationTestCase):
class TestProjectType(ERPNextTestSuite):
pass

View File

@@ -1,8 +1,8 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestProjectUpdate(IntegrationTestCase):
class TestProjectUpdate(ERPNextTestSuite):
pass

View File

@@ -1,8 +1,8 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestProjectsSettings(IntegrationTestCase):
class TestProjectsSettings(ERPNextTestSuite):
pass

View File

@@ -1,8 +1,8 @@
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestTaskType(IntegrationTestCase):
class TestTaskType(ERPNextTestSuite):
pass

View File

@@ -3,7 +3,6 @@
import datetime
import frappe
from frappe.tests import IntegrationTestCase
from frappe.utils import add_to_date, now_datetime, nowdate
from erpnext.accounts.doctype.sales_invoice.sales_invoice import make_sales_return
@@ -118,7 +117,7 @@ class TestTimesheet(ERPNextTestSuite):
self.assertEqual(item.qty, 2.00)
self.assertEqual(item.rate, 50.00)
@IntegrationTestCase.change_settings("Projects Settings", {"fetch_timesheet_in_sales_invoice": 1})
@ERPNextTestSuite.change_settings("Projects Settings", {"fetch_timesheet_in_sales_invoice": 1})
def test_timesheet_billing_based_on_project(self):
emp = make_employee("test_employee_6@salary.com")
project = frappe.get_value("Project", {"project_name": "_Test Project"})

View File

@@ -1,12 +1,12 @@
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
from erpnext.tests.utils import ERPNextTestSuite
class TestDelayedTasksSummary(IntegrationTestCase):
class TestDelayedTasksSummary(ERPNextTestSuite):
@classmethod
def setUp(self):
task1 = create_task("_Test Task 98", add_days(nowdate(), -10), nowdate())