fix:appointment tests exist check

This commit is contained in:
Pranav Nachanekar
2019-09-30 12:40:25 +05:30
parent fd46bf2616
commit 7f4bc64d22

View File

@@ -8,7 +8,7 @@ import unittest
import datetime import datetime
def create_test_lead(): def create_test_lead():
if frappe.db.exists('Lead',filters={'lead_name':'Test Lead'}): if frappe.db.exists({'doctype:''Lead','lead_name':'Test Lead'}):
return return
test_lead = frappe.get_doc({ test_lead = frappe.get_doc({
'doctype':'Lead', 'doctype':'Lead',
@@ -19,7 +19,10 @@ def create_test_lead():
return test_lead return test_lead
def create_test_appointments(): def create_test_appointments():
if frappe.db.exists('Appointment',filters={'email':'test@example.com'}): if frappe.db.exists({
'doctype':'Appointment',
'email':'test@example.com'
}):
return return
test_appointment = frappe.get_doc({ test_appointment = frappe.get_doc({
'doctype':'Appointment', 'doctype':'Appointment',