mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-15 01:43:10 +00:00
refactor(test): hardcoded names over dynamic ones
Much faster bootstrap without those get_doc calls
This commit is contained in:
@@ -120,7 +120,7 @@ class TestLead(ERPNextTestSuite):
|
||||
create_todo("followup", "Lead", lead.name)
|
||||
|
||||
opportunity = make_opportunity(lead.name)
|
||||
opportunity.company = self.companies[0].name
|
||||
opportunity.company = "_Test Company"
|
||||
opportunity.save()
|
||||
|
||||
self.assertEqual(opportunity.get("party_name"), lead.name)
|
||||
|
||||
@@ -54,7 +54,7 @@ class TestOpportunity(ERPNextTestSuite):
|
||||
self.assertEqual(doc.status, "Quotation")
|
||||
|
||||
def test_make_new_lead_if_required(self):
|
||||
opp_doc = make_opportunity_from_lead(self.companies[0].name)
|
||||
opp_doc = make_opportunity_from_lead("_Test Company")
|
||||
|
||||
self.assertTrue(opp_doc.party_name)
|
||||
self.assertEqual(opp_doc.opportunity_from, "Lead")
|
||||
|
||||
@@ -11,7 +11,7 @@ from erpnext.tests.utils import ERPNextTestSuite
|
||||
|
||||
class TestProspect(ERPNextTestSuite):
|
||||
def test_add_lead_to_prospect_and_address_linking(self):
|
||||
company = self.companies[0].name
|
||||
company = "_Test Company"
|
||||
lead_doc = make_lead()
|
||||
address_doc = make_address(address_title=lead_doc.name)
|
||||
address_doc.append("links", {"link_doctype": lead_doc.doctype, "link_name": lead_doc.name})
|
||||
@@ -37,7 +37,7 @@ class TestProspect(ERPNextTestSuite):
|
||||
"doctype": "Prospect",
|
||||
"company_name": "_Test Prospect",
|
||||
"customer_group": "_Test Customer Group",
|
||||
"company": self.companies[0].name,
|
||||
"company": "_Test Company",
|
||||
}
|
||||
)
|
||||
prospect.insert()
|
||||
|
||||
Reference in New Issue
Block a user