|
|
@ -6,13 +6,17 @@ from __future__ import unicode_literals |
|
|
|
import frappe |
|
|
|
|
|
|
|
def create_test_contact_and_address(): |
|
|
|
if not frappe.db.exists('Address', '_Test Address for Customer-Office'): |
|
|
|
frappe.db.sql('delete from tabContact') |
|
|
|
frappe.db.sql('delete from tabAddress') |
|
|
|
frappe.db.sql('delete from `tabDynamic Link`') |
|
|
|
|
|
|
|
frappe.get_doc(dict( |
|
|
|
doctype='Address', |
|
|
|
address_title='_Test Address for Customer', |
|
|
|
address_type='Office', |
|
|
|
address_line1='Station Road', |
|
|
|
city='Mumbai', |
|
|
|
city='_Test City', |
|
|
|
state='Test State', |
|
|
|
country='India', |
|
|
|
links = [dict( |
|
|
|
link_doctype='Customer', |
|
|
@ -20,7 +24,6 @@ def create_test_contact_and_address(): |
|
|
|
)] |
|
|
|
)).insert() |
|
|
|
|
|
|
|
if not frappe.db.exists('Contact', '_Test Contact for _Test Customer-_Test Customer'): |
|
|
|
frappe.get_doc(dict( |
|
|
|
doctype='Contact', |
|
|
|
email_id='test_contact_customer@example.com', |
|
|
|