[fix] tax rule test

This commit is contained in:
Rushabh Mehta 2017-01-18 14:14:20 +05:30
parent 8f55d6bf3a
commit a0c41b70c4
3 changed files with 28 additions and 29 deletions

View File

@ -27,11 +27,6 @@ class TestCustomer(unittest.TestCase):
def test_party_details(self): def test_party_details(self):
from erpnext.accounts.party import get_party_details from erpnext.accounts.party import get_party_details
frappe.db.sql('delete from tabContact')
frappe.db.sql('delete from tabAddress')
frappe.db.sql('delete from `tabDynamic Link`')
to_check = { to_check = {
'selling_price_list': None, 'selling_price_list': None,
'customer_group': '_Test Customer Group', 'customer_group': '_Test Customer Group',

View File

@ -160,6 +160,7 @@ def decorate_quotation_doc(doc):
return doc return doc
def _get_cart_quotation(party=None): def _get_cart_quotation(party=None):
'''Return the open Quotation of type "Shopping Cart" or make a new one'''
if not party: if not party:
party = get_party() party = get_party()

View File

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