fix: Do not use random customers

This commit is contained in:
Deepesh Garg 2020-07-11 18:36:32 +05:30
parent f15ff5fbfa
commit 46bcb46422
2 changed files with 4 additions and 5 deletions

View File

@ -14,12 +14,10 @@ class TestMapper(unittest.TestCase):
make_test_records("Item")
items = frappe.get_all("Item", fields = ["name", "item_code"], filters = {'is_sales_item': 1, 'has_variants': 0, 'disabled': 0})
customers = frappe.get_all("Customer")
if items and customers:
if items:
# Make source docs (quotations) and a target doc (sales order)
customer = random.choice(customers).name
qtn1, item_list_1 = self.make_quotation(items, customer)
qtn2, item_list_2 = self.make_quotation(items, customer)
qtn1, item_list_1 = self.make_quotation(items, '_Test Customer')
qtn2, item_list_2 = self.make_quotation(items, '_Test Customer')
so, item_list_3 = self.make_sales_order()
# Map source docs to target with corresponding mapper method

View File

@ -454,6 +454,7 @@
{
"doctype": "Item Tax",
"parentfield": "taxes",
"tax_category": "_Test Tax Category 1",
"item_tax_template": "_Test Item Tax Template 1"
}
]