blob: 7024b0db92aa1c93b80803e4a6fc27ce1bb052a4 [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():
Rushabh Mehtaa0c41b72017-01-18 14:14:20 +05309 frappe.db.sql('delete from tabContact')
10 frappe.db.sql('delete from tabAddress')
11 frappe.db.sql('delete from `tabDynamic Link`')
Rushabh Mehta982be9f2017-01-17 17:57:19 +053012
Rushabh Mehtaa0c41b72017-01-18 14:14:20 +053013 frappe.get_doc(dict(
14 doctype='Address',
15 address_title='_Test Address for Customer',
16 address_type='Office',
17 address_line1='Station Road',
18 city='_Test City',
19 state='Test State',
20 country='India',
21 links = [dict(
22 link_doctype='Customer',
23 link_name='_Test Customer'
24 )]
25 )).insert()
26
27 frappe.get_doc(dict(
28 doctype='Contact',
29 email_id='test_contact_customer@example.com',
30 phone='+91 0000000000',
31 first_name='_Test Contact for _Test Customer',
32 links = [dict(
33 link_doctype='Customer',
34 link_name='_Test Customer'
35 )]
36 )).insert()