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

@@ -4,15 +4,15 @@
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

@@ -2,10 +2,11 @@
# See license.txt
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

@@ -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 TestIssueType(IntegrationTestCase):
class TestIssueType(ERPNextTestSuite):
pass

View File

@@ -3,16 +3,16 @@
import datetime
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

@@ -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 TestSupportSettings(IntegrationTestCase):
class TestSupportSettings(ERPNextTestSuite):
pass

View File

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

View File

@@ -1,6 +1,5 @@
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
@@ -8,11 +7,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()