fix: more test errors
This commit is contained in:
parent
4856645b6d
commit
76cbb9132f
@ -8,8 +8,9 @@ import unittest
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
def create_test_lead():
|
def create_test_lead():
|
||||||
if frappe.db.exists({'doctype':'Lead','lead_name':'Test Lead'}):
|
test_lead = frappe.db.exists({'doctype':'Lead','lead_name':'Test Lead'})
|
||||||
return frappe.get_doc('Lead','Test Lead')
|
if test_lead:
|
||||||
|
return frappe.get_doc('Lead',test_lead)
|
||||||
test_lead = frappe.get_doc({
|
test_lead = frappe.get_doc({
|
||||||
'doctype':'Lead',
|
'doctype':'Lead',
|
||||||
'lead_name':'Test Lead',
|
'lead_name':'Test Lead',
|
||||||
@ -19,11 +20,9 @@ def create_test_lead():
|
|||||||
return test_lead
|
return test_lead
|
||||||
|
|
||||||
def create_test_appointments():
|
def create_test_appointments():
|
||||||
if frappe.db.exists({
|
test_appointment = frappe.db.exists({ 'doctype':'Appointment', 'email':'test@example.com' })
|
||||||
'doctype':'Appointment',
|
if test_appointment:
|
||||||
'email':'test@example.com'
|
return frappe.get_doc('Appointment',test_appointment)
|
||||||
}):
|
|
||||||
return frappe.get_doc('Appointment','Test Appointment')
|
|
||||||
test_appointment = frappe.get_doc({
|
test_appointment = frappe.get_doc({
|
||||||
'doctype':'Appointment',
|
'doctype':'Appointment',
|
||||||
'email':'test@example.com',
|
'email':'test@example.com',
|
||||||
|
Loading…
Reference in New Issue
Block a user