mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
refactor(test): make LCV deterministic
This commit is contained in:
@@ -24,6 +24,11 @@ from erpnext.tests.utils import ERPNextTestSuite
|
|||||||
|
|
||||||
|
|
||||||
class TestLandedCostVoucher(ERPNextTestSuite):
|
class TestLandedCostVoucher(ERPNextTestSuite):
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
super().setUpClass()
|
||||||
|
cls.load_test_records("Currency Exchange")
|
||||||
|
|
||||||
def test_landed_cost_voucher(self):
|
def test_landed_cost_voucher(self):
|
||||||
frappe.db.set_single_value("Buying Settings", "allow_multiple_items", 1)
|
frappe.db.set_single_value("Buying Settings", "allow_multiple_items", 1)
|
||||||
|
|
||||||
@@ -398,6 +403,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
|
|||||||
"doctype": "Serial No",
|
"doctype": "Serial No",
|
||||||
"item_code": item_code,
|
"item_code": item_code,
|
||||||
"serial_no": serial_no,
|
"serial_no": serial_no,
|
||||||
|
"company": self.companies[0].name,
|
||||||
}
|
}
|
||||||
).insert()
|
).insert()
|
||||||
|
|
||||||
@@ -669,6 +675,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
|
|||||||
"doctype": "Serial No",
|
"doctype": "Serial No",
|
||||||
"item_code": sn_item,
|
"item_code": sn_item,
|
||||||
"serial_no": sn,
|
"serial_no": sn,
|
||||||
|
"company": self.companies[0].name,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
sn_doc.insert()
|
sn_doc.insert()
|
||||||
@@ -819,6 +826,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
|
|||||||
"doctype": "Serial No",
|
"doctype": "Serial No",
|
||||||
"item_code": sn_item,
|
"item_code": sn_item,
|
||||||
"serial_no": sn,
|
"serial_no": sn,
|
||||||
|
"company": self.companies[0].name,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
sn_doc.insert()
|
sn_doc.insert()
|
||||||
@@ -1008,6 +1016,7 @@ class TestLandedCostVoucher(ERPNextTestSuite):
|
|||||||
"doctype": "Serial No",
|
"doctype": "Serial No",
|
||||||
"item_code": sn_item,
|
"item_code": sn_item,
|
||||||
"serial_no": sn,
|
"serial_no": sn,
|
||||||
|
"company": self.companies[0].name,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
sn_doc.insert()
|
sn_doc.insert()
|
||||||
|
|||||||
Reference in New Issue
Block a user