[fix] test_shopping_cart.py
This commit is contained in:
parent
d14a6c058a
commit
8f55d6bf3a
@ -368,7 +368,8 @@ def get_debtors_account(cart_settings):
|
||||
return debtors_account_name
|
||||
|
||||
|
||||
def get_address_docs(doctype=None, txt=None, filters=None, limit_start=0, limit_page_length=20, party=None):
|
||||
def get_address_docs(doctype=None, txt=None, filters=None, limit_start=0, limit_page_length=20,
|
||||
party=None):
|
||||
if not party:
|
||||
party = get_party()
|
||||
|
||||
@ -380,8 +381,8 @@ def get_address_docs(doctype=None, txt=None, filters=None, limit_start=0, limit_
|
||||
|
||||
out = []
|
||||
|
||||
for address_name in address_names:
|
||||
address = frappe.get_doc('Address', address_name)
|
||||
for a in address_names:
|
||||
address = frappe.get_doc('Address', a.parent)
|
||||
address.display = get_address_display(address.as_dict())
|
||||
out.append(address)
|
||||
|
||||
|
@ -14,6 +14,7 @@ class TestShoppingCart(unittest.TestCase):
|
||||
"""
|
||||
def setUp(self):
|
||||
frappe.set_user("Administrator")
|
||||
create_test_contact_and_address()
|
||||
self.enable_shopping_cart()
|
||||
|
||||
def tearDown(self):
|
||||
@ -185,7 +186,6 @@ class TestShoppingCart(unittest.TestCase):
|
||||
frappe.set_user("test_cart_user@example.com")
|
||||
|
||||
def login_as_customer(self):
|
||||
create_test_contact_and_address()
|
||||
self.create_user_if_not_exists("test_contact_customer@example.com",
|
||||
"_Test Contact For _Test Customer")
|
||||
frappe.set_user("test_contact_customer@example.com")
|
||||
|
Loading…
x
Reference in New Issue
Block a user