fix: test case

This commit is contained in:
Nabin Hait 2022-06-15 13:07:54 +05:30
parent d8163f3e47
commit 82bf59e2a3
3 changed files with 7 additions and 22 deletions

View File

@ -16,23 +16,23 @@
"opportunity_from",
"party_name",
"customer_name",
"status",
"column_break0",
"opportunity_type",
"source",
"opportunity_owner",
"column_break_10",
"status",
"sales_stage",
"expected_closing",
"probability",
"organization_details_section",
"no_of_employees",
"annual_revenue",
"column_break_23",
"customer_group",
"column_break_23",
"industry",
"column_break_31",
"market_segment",
"column_break_31",
"territory",
"website",
"section_break_14",
@ -607,7 +607,7 @@
"icon": "fa fa-info-sign",
"idx": 195,
"links": [],
"modified": "2022-06-10 10:37:25.537444",
"modified": "2022-06-10 16:19:33.310006",
"modified_by": "Administrator",
"module": "CRM",
"name": "Opportunity",

View File

@ -97,22 +97,6 @@ class TestOpportunity(unittest.TestCase):
self.assertEqual(quotation_comment_count, 4)
self.assertEqual(quotation_communication_count, 4)
def test_render_template_for_to_discuss(self):
doc = make_opportunity(with_items=0, opportunity_from="Lead")
doc.contact_by = "test@example.com"
doc.contact_date = add_days(today(), days=2)
doc.to_discuss = "{{ doc.name }} test data"
doc.save()
event = frappe.get_all(
"Event Participants",
fields=["parent"],
filters={"reference_doctype": doc.doctype, "reference_docname": doc.name},
)
event_description = frappe.db.get_value("Event", event[0].parent, "description")
self.assertTrue(doc.name in event_description)
def make_opportunity_from_lead():
new_lead_email_id = "new{}@example.com".format(random_string(5))
@ -139,7 +123,6 @@ def make_opportunity(**args):
"opportunity_from": args.opportunity_from or "Customer",
"opportunity_type": "Sales",
"conversion_rate": 1.0,
"with_items": args.with_items or 0,
"transaction_date": today(),
}
)

View File

@ -8,7 +8,9 @@
"transaction_date": "2013-12-12",
"items": [{
"item_name": "Test Item",
"description": "Some description"
"description": "Some description",
"qty": 5,
"rate": 100
}]
}
]