From bb3cec15567b6ed8e48de7e3927f31945c590f90 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Sat, 31 Aug 2019 14:32:07 +0530 Subject: [PATCH] test: fetch data from customer credit limit --- erpnext/selling/doctype/customer/test_customer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py index 1ef2aabead..e5771b2359 100644 --- a/erpnext/selling/doctype/customer/test_customer.py +++ b/erpnext/selling/doctype/customer/test_customer.py @@ -226,7 +226,7 @@ class TestCustomer(unittest.TestCase): make_sales_order(qty=item_qty) if credit_limit == 0.0: - frappe.db.set_value("Customer", {'parent': '_Test Customer', 'company': '_Test Company'}, 'credit_limit', outstanding_amt - 50.0) + frappe.db.set_value("Customer Credit Limit", {'parent': '_Test Customer', 'company': '_Test Company'}, 'credit_limit', outstanding_amt - 50.0) # Sales Order so = make_sales_order(do_not_submit=True) @@ -252,7 +252,7 @@ class TestCustomer(unittest.TestCase): def test_customer_credit_limit_on_change(self): outstanding_amt = self.get_customer_outstanding_amount() customer = frappe.get_doc("Customer", '_Test Customer') - customer.credit_limit_reference['credit_limit'] = flt(outstanding_amt - 100) + customer.credit_limit_reference[0].credit_limit = flt(outstanding_amt - 100) self.assertRaises(frappe.ValidationError, customer.save) def test_customer_payment_terms(self):