refactor(test): remove hardcoded names

This commit is contained in:
ruthra kumar
2024-12-23 14:49:42 +05:30
parent cf4068d1a3
commit 33fc987d95

View File

@@ -1990,6 +1990,7 @@ class TestAccountsController(FrappeTestCase):
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)
@@ -1997,8 +1998,8 @@ class TestAccountsController(FrappeTestCase):
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,
@@ -2048,8 +2049,8 @@ class TestAccountsController(FrappeTestCase):
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,