fix: linter issues

This commit is contained in:
Anupam 2021-12-18 20:12:57 +05:30
parent 31ac1011b8
commit 5b40d9e7cd
2 changed files with 3 additions and 3 deletions

View File

@ -7,8 +7,8 @@ import frappe
from frappe.utils import now_datetime, random_string, today
from erpnext.crm.doctype.lead.lead import make_customer
from erpnext.crm.doctype.opportunity.opportunity import make_quotation
from erpnext.crm.doctype.lead.test_lead import make_lead
from erpnext.crm.doctype.opportunity.opportunity import make_quotation
from erpnext.crm.utils import get_linked_communication_list
test_records = frappe.get_test_records('Opportunity')
@ -66,7 +66,7 @@ class TestOpportunity(unittest.TestCase):
lead_doc.add_comment('Comment', text='Test Comment 2')
create_communication(lead_doc.doctype, lead_doc.name, lead_doc.email_id)
create_communication(lead_doc.doctype, lead_doc.name, lead_doc.email_id)
opp_doc = make_opportunity(opportunity_from="Lead", lead=lead_doc.name)
opportunity_comment_count = frappe.db.count("Comment", {"reference_doctype": opp_doc.doctype, "reference_name": opp_doc.name})
opportunity_communication_count = len(get_linked_communication_list(opp_doc.doctype, opp_doc.name))

View File

@ -46,5 +46,5 @@ def get_linked_communication_list(doctype, docname):
"link_name": docname,
"parent": ("not in", communications)
}, pluck="parent")
return communications + communication_links