blob: 8d24f5e6447cb8e866f7b0fe9556f51947128476 [file] [log] [blame]
Rushabh Mehta982be9f2017-01-17 17:57:19 +05301# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
2# License: GNU General Public License v3. See license.txt
3
4from __future__ import unicode_literals
5
6import frappe
7
8def create_test_contact_and_address():
9 if not frappe.db.exists('Address', '_Test Address for Customer-Office'):
10 frappe.get_doc(dict(
11 doctype='Address',
12 address_title='_Test Address for Customer',
13 address_type='Office',
14 address_line1='Station Road',
15 city='Mumbai',
16 country='India',
17 links = [dict(
18 link_doctype='Customer',
19 link_name='_Test Customer'
20 )]
21 )).insert()
22
23 if not frappe.db.exists('Contact', '_Test Contact for _Test Customer-_Test Customer'):
24 frappe.get_doc(dict(
25 doctype='Contact',
26 email_id='test_contact_customer@example.com',
27 phone='+91 0000000000',
28 first_name='_Test Contact for _Test Customer',
29 links = [dict(
30 link_doctype='Customer',
31 link_name='_Test Customer'
32 )]
33 )).insert()