mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-15 09:53:09 +00:00
refactor: replace IntegrationTestCase with ERPNextTestCase repo-wide
- import ERPNextTestSuite - use it on test class
This commit is contained in:
@@ -4,7 +4,8 @@ import datetime
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
LEAD_EMAIL = "test_appointment_lead@example.com"
|
||||
|
||||
@@ -26,7 +27,7 @@ def create_test_appointment():
|
||||
return test_appointment
|
||||
|
||||
|
||||
class TestAppointment(IntegrationTestCase):
|
||||
class TestAppointment(ERPNextTestSuite):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestAppointmentBookingSettings(IntegrationTestCase):
|
||||
class TestAppointmentBookingSettings(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestCampaign(IntegrationTestCase):
|
||||
class TestCampaign(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestCompetitor(IntegrationTestCase):
|
||||
class TestCompetitor(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import add_days, nowdate
|
||||
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
class TestContract(IntegrationTestCase):
|
||||
|
||||
class TestContract(ERPNextTestSuite):
|
||||
def setUp(self):
|
||||
frappe.db.sql("delete from `tabContract`")
|
||||
self.contract_doc = get_contract()
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# See license.txt
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestContractFulfilmentChecklist(IntegrationTestCase):
|
||||
class TestContractFulfilmentChecklist(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# See license.txt
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestContractTemplate(IntegrationTestCase):
|
||||
class TestContractTemplate(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestCRMSettings(IntegrationTestCase):
|
||||
class TestCRMSettings(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestEmailCampaign(IntegrationTestCase):
|
||||
class TestEmailCampaign(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# See license.txt
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestMarketSegment(IntegrationTestCase):
|
||||
class TestMarketSegment(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# See license.txt
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestOpportunityType(IntegrationTestCase):
|
||||
class TestOpportunityType(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import random_string
|
||||
|
||||
from erpnext.crm.doctype.lead.lead import add_lead_to_prospect
|
||||
from erpnext.crm.doctype.lead.test_lead import make_lead
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestProspect(IntegrationTestCase):
|
||||
class TestProspect(ERPNextTestSuite):
|
||||
def test_add_lead_to_prospect_and_address_linking(self):
|
||||
lead_doc = make_lead()
|
||||
address_doc = make_address(address_title=lead_doc.name)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# See license.txt
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestSalesStage(IntegrationTestCase):
|
||||
class TestSalesStage(ERPNextTestSuite):
|
||||
pass
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
from erpnext.crm.report.opportunity_summary_by_sales_stage.opportunity_summary_by_sales_stage import (
|
||||
execute,
|
||||
)
|
||||
@@ -11,9 +6,10 @@ from erpnext.crm.report.sales_pipeline_analytics.test_sales_pipeline_analytics i
|
||||
create_customer,
|
||||
create_opportunity,
|
||||
)
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestOpportunitySummaryBySalesStage(IntegrationTestCase):
|
||||
class TestOpportunitySummaryBySalesStage(ERPNextTestSuite):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
from erpnext.crm.report.sales_pipeline_analytics.sales_pipeline_analytics import execute
|
||||
from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
|
||||
class TestSalesPipelineAnalytics(IntegrationTestCase):
|
||||
class TestSalesPipelineAnalytics(ERPNextTestSuite):
|
||||
def setUp(self):
|
||||
create_company()
|
||||
create_customer()
|
||||
|
||||
Reference in New Issue
Block a user