From ab91abb1440a94639e30f68c7c999a5c324642c3 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 23 Dec 2024 14:53:39 +0530 Subject: [PATCH] refacto(test): remove hardcoded names --- erpnext/controllers/tests/test_accounts_controller.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/tests/test_accounts_controller.py b/erpnext/controllers/tests/test_accounts_controller.py index 4a37cbe78d1..6bc11b72677 100644 --- a/erpnext/controllers/tests/test_accounts_controller.py +++ b/erpnext/controllers/tests/test_accounts_controller.py @@ -1992,6 +1992,7 @@ class TestAccountsController(IntegrationTestCase): adv.save() self.assertEqual(adv.paid_from, self.advance_received_usd) adv.submit() + adv.reload() # create sales invoice with advance received si = self.create_sales_invoice(qty=1, conversion_rate=80, rate=1, do_not_submit=True) @@ -1999,8 +2000,8 @@ class TestAccountsController(IntegrationTestCase): si.append( "advances", { - "reference_type": "Payment Entry", - "reference_name": "ACC-PAY-2024-00001", + "reference_type": adv.doctype, + "reference_name": adv.name, "remarks": "Amount INR 1 received from _Test MC Customer USD\nTransaction reference no Test001 dated 2024-12-19", "advance_amount": 1.0, "allocated_amount": 1.0, @@ -2050,8 +2051,8 @@ class TestAccountsController(IntegrationTestCase): pi.append( "advances", { - "reference_type": "Payment Entry", - "reference_name": "ACC-PAY-2024-00002", + "reference_type": adv.doctype, + "reference_name": adv.name, "remarks": "Amount INR 1 paid to _Test MC Supplier USD\nTransaction reference no Test001 dated 2024-12-20", "advance_amount": 1.0, "allocated_amount": 1.0,