refactor(test): make LCV deterministic

This commit is contained in:
ruthra kumar
2025-12-26 17:24:18 +05:30
parent 7853b779bd
commit db49e6d830

View File

@@ -24,6 +24,11 @@ from erpnext.tests.utils import ERPNextTestSuite
class TestLandedCostVoucher(ERPNextTestSuite):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.load_test_records("Currency Exchange")
def test_landed_cost_voucher(self):
frappe.db.set_single_value("Buying Settings", "allow_multiple_items", 1)
@@ -398,6 +403,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
"doctype": "Serial No",
"item_code": item_code,
"serial_no": serial_no,
"company": self.companies[0].name,
}
).insert()
@@ -669,6 +675,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
"doctype": "Serial No",
"item_code": sn_item,
"serial_no": sn,
"company": self.companies[0].name,
}
)
sn_doc.insert()
@@ -819,6 +826,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
"doctype": "Serial No",
"item_code": sn_item,
"serial_no": sn,
"company": self.companies[0].name,
}
)
sn_doc.insert()
@@ -1008,6 +1016,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
"doctype": "Serial No",
"item_code": sn_item,
"serial_no": sn,
"company": self.companies[0].name,
}
)
sn_doc.insert()