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 0fdc961a4b
commit f1dfac417d
319 changed files with 870 additions and 867 deletions

View File

@@ -3,12 +3,12 @@
import unittest
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

@@ -2,8 +2,8 @@
# See license.txt
import unittest
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestProjectType(IntegrationTestCase):
class TestProjectType(ERPNextTestSuite):
pass

View File

@@ -2,9 +2,8 @@
# See license.txt
import unittest
import frappe
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestProjectUpdate(IntegrationTestCase):
class TestProjectUpdate(ERPNextTestSuite):
pass

View File

@@ -2,8 +2,8 @@
# See license.txt
import unittest
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestProjectsSettings(IntegrationTestCase):
class TestProjectsSettings(ERPNextTestSuite):
pass

View File

@@ -2,8 +2,8 @@
# See license.txt
import unittest
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestTaskType(IntegrationTestCase):
class TestTaskType(ERPNextTestSuite):
pass

View File

@@ -4,7 +4,6 @@ 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.sales_invoice import make_sales_return
@@ -119,7 +118,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,14 +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
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())