mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-01 07:37:04 +00:00
refactor(test): remove explicit sql delete calls
This commit is contained in:
@@ -9,7 +9,6 @@ from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
class TestContract(ERPNextTestSuite):
|
||||
def setUp(self):
|
||||
frappe.db.sql("delete from `tabContract`")
|
||||
self.contract_doc = get_contract()
|
||||
|
||||
def test_validate_start_date_before_end_date(self):
|
||||
|
||||
@@ -86,9 +86,6 @@ class TestLead(ERPNextTestSuite):
|
||||
self.assertEqual(len(address_1.get("links")), 1)
|
||||
|
||||
def test_prospect_creation_from_lead(self):
|
||||
frappe.db.sql("delete from `tabLead` where lead_name='Rahul Tripathi'")
|
||||
frappe.db.sql("delete from `tabProspect` where name='Prospect Company'")
|
||||
|
||||
lead = make_lead(
|
||||
first_name="Rahul",
|
||||
last_name="Tripathi",
|
||||
@@ -108,9 +105,6 @@ class TestLead(ERPNextTestSuite):
|
||||
self.assertEqual(event.event_participants[1].reference_docname, prospect)
|
||||
|
||||
def test_opportunity_from_lead(self):
|
||||
frappe.db.sql("delete from `tabLead` where lead_name='Rahul Tripathi'")
|
||||
frappe.db.sql("delete from `tabOpportunity` where party_name='Rahul Tripathi'")
|
||||
|
||||
lead = make_lead(
|
||||
first_name="Rahul",
|
||||
last_name="Tripathi",
|
||||
@@ -138,9 +132,6 @@ class TestLead(ERPNextTestSuite):
|
||||
)
|
||||
|
||||
def test_copy_events_from_lead_to_prospect(self):
|
||||
frappe.db.sql("delete from `tabLead` where lead_name='Rahul Tripathi'")
|
||||
frappe.db.sql("delete from `tabProspect` where name='Prospect Company'")
|
||||
|
||||
lead = make_lead(
|
||||
first_name="Rahul",
|
||||
last_name="Tripathi",
|
||||
|
||||
Reference in New Issue
Block a user