mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 03:17:55 +00:00
refactor: Use IntegrationTestCase in multiple files
Signed-off-by: David <dgx.arnold@gmail.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import datetime
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
LEAD_EMAIL = "test_appointment_lead@example.com"
|
||||
|
||||
@@ -26,7 +26,7 @@ def create_test_appointment():
|
||||
return test_appointment
|
||||
|
||||
|
||||
class TestAppointment(unittest.TestCase):
|
||||
class TestAppointment(IntegrationTestCase):
|
||||
def setUpClass():
|
||||
frappe.db.delete("Lead", {"email_id": LEAD_EMAIL})
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestAppointmentBookingSettings(unittest.TestCase):
|
||||
|
||||
class TestAppointmentBookingSettings(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestCampaign(unittest.TestCase):
|
||||
|
||||
class TestCampaign(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestCompetitor(unittest.TestCase):
|
||||
|
||||
class TestCompetitor(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import add_days, nowdate
|
||||
|
||||
|
||||
class TestContract(unittest.TestCase):
|
||||
class TestContract(IntegrationTestCase):
|
||||
def setUp(self):
|
||||
frappe.db.sql("delete from `tabContract`")
|
||||
self.contract_doc = get_contract()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestContractFulfilmentChecklist(unittest.TestCase):
|
||||
|
||||
class TestContractFulfilmentChecklist(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestContractTemplate(unittest.TestCase):
|
||||
|
||||
class TestContractTemplate(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestCRMSettings(unittest.TestCase):
|
||||
|
||||
class TestCRMSettings(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
# import frappe
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestEmailCampaign(unittest.TestCase):
|
||||
|
||||
class TestEmailCampaign(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import random_string, today
|
||||
|
||||
from erpnext.crm.doctype.lead.lead import make_opportunity
|
||||
@@ -13,7 +12,7 @@ from erpnext.crm.utils import get_linked_prospect
|
||||
test_records = frappe.get_test_records("Lead")
|
||||
|
||||
|
||||
class TestLead(unittest.TestCase):
|
||||
class TestLead(IntegrationTestCase):
|
||||
def test_make_customer(self):
|
||||
from erpnext.crm.doctype.lead.lead import make_customer
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestMarketSegment(unittest.TestCase):
|
||||
|
||||
class TestMarketSegment(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.utils import now_datetime, random_string, today
|
||||
|
||||
from erpnext.crm.doctype.lead.lead import make_customer
|
||||
@@ -14,7 +14,7 @@ from erpnext.crm.utils import get_linked_communication_list
|
||||
test_records = frappe.get_test_records("Opportunity")
|
||||
|
||||
|
||||
class TestOpportunity(unittest.TestCase):
|
||||
class TestOpportunity(IntegrationTestCase):
|
||||
def test_opportunity_status(self):
|
||||
doc = make_opportunity(with_items=0)
|
||||
quotation = make_quotation(doc.name)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestOpportunityType(unittest.TestCase):
|
||||
|
||||
class TestOpportunityType(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
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
|
||||
|
||||
|
||||
class TestProspect(unittest.TestCase):
|
||||
class TestProspect(IntegrationTestCase):
|
||||
def test_add_lead_to_prospect_and_address_linking(self):
|
||||
lead_doc = make_lead()
|
||||
address_doc = make_address(address_title=lead_doc.name)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# See license.txt
|
||||
|
||||
import unittest
|
||||
|
||||
from frappe.tests import IntegrationTestCase
|
||||
|
||||
class TestSalesStage(unittest.TestCase):
|
||||
|
||||
class TestSalesStage(IntegrationTestCase):
|
||||
pass
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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,
|
||||
@@ -12,7 +13,7 @@ from erpnext.crm.report.sales_pipeline_analytics.test_sales_pipeline_analytics i
|
||||
)
|
||||
|
||||
|
||||
class TestOpportunitySummaryBySalesStage(unittest.TestCase):
|
||||
class TestOpportunitySummaryBySalesStage(IntegrationTestCase):
|
||||
@classmethod
|
||||
def setUpClass(self):
|
||||
frappe.db.delete("Opportunity")
|
||||
|
||||
Reference in New Issue
Block a user