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

@@ -5,15 +5,15 @@ import unittest
import frappe
from frappe import _
from frappe.core.doctype.user_permission.test_user_permission import create_user
from frappe.tests import IntegrationTestCase
from frappe.utils import flt, get_datetime
from erpnext.support.doctype.service_level_agreement.test_service_level_agreement import (
create_service_level_agreements_for_issues,
)
from erpnext.tests.utils import ERPNextTestSuite
class TestSetUp(IntegrationTestCase):
class TestSetUp(ERPNextTestSuite):
def setUp(self):
frappe.db.sql("delete from `tabService Level Agreement`")
frappe.db.sql("delete from `tabService Level Priority`")

View File

@@ -3,10 +3,11 @@
import unittest
import frappe
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestIssuePriority(IntegrationTestCase):
class TestIssuePriority(ERPNextTestSuite):
def test_priorities(self):
make_priorities()
priorities = frappe.get_list("Issue Priority")

View File

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

View File

@@ -4,16 +4,16 @@ import datetime
import unittest
import frappe
from frappe.tests import IntegrationTestCase
from frappe.utils import flt
from erpnext.support.doctype.issue_priority.test_issue_priority import make_priorities
from erpnext.support.doctype.service_level_agreement.service_level_agreement import (
get_service_level_agreement_fields,
)
from erpnext.tests.utils import ERPNextTestSuite
class TestServiceLevelAgreement(IntegrationTestCase):
class TestServiceLevelAgreement(ERPNextTestSuite):
def setUp(self):
self.create_company()
frappe.db.set_single_value("Support Settings", "track_service_level_agreement", 1)

View File

@@ -2,8 +2,8 @@
# See license.txt
import unittest
from frappe.tests import IntegrationTestCase
from erpnext.tests.utils import ERPNextTestSuite
class TestSupportSettings(IntegrationTestCase):
class TestSupportSettings(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 TestWarrantyClaim(IntegrationTestCase):
class TestWarrantyClaim(ERPNextTestSuite):
pass

View File

@@ -2,7 +2,6 @@ import unittest
import frappe
from frappe.desk.form.assign_to import add as add_assignment
from frappe.tests import IntegrationTestCase
from frappe.utils import add_months, getdate
from erpnext.support.doctype.issue.test_issue import create_customer, make_issue
@@ -10,11 +9,12 @@ from erpnext.support.doctype.service_level_agreement.test_service_level_agreemen
create_service_level_agreements_for_issues,
)
from erpnext.support.report.issue_analytics.issue_analytics import execute
from erpnext.tests.utils import ERPNextTestSuite
months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
class TestIssueAnalytics(IntegrationTestCase):
class TestIssueAnalytics(ERPNextTestSuite):
@classmethod
def setUpClass(cls):
super().setUpClass()