mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-02 16:13:22 +00:00
test: don't override tearDown; rely on ERPNextTestSuite rollback
This commit is contained in:
@@ -19,18 +19,10 @@ class TestBOMVarianceReport(ERPNextTestSuite):
|
|||||||
)
|
)
|
||||||
self.raw_materials = self.get_bom_raw_materials()
|
self.raw_materials = self.get_bom_raw_materials()
|
||||||
|
|
||||||
self.overproduction_percentage = frappe.db.get_single_value(
|
# allow over-production so a Work Order can produce more than planned; ERPNextTestSuite
|
||||||
"Manufacturing Settings", "overproduction_percentage_for_work_order"
|
# rolls this back at tearDown, so no manual restore is needed
|
||||||
)
|
|
||||||
frappe.db.set_single_value("Manufacturing Settings", "overproduction_percentage_for_work_order", 100)
|
frappe.db.set_single_value("Manufacturing Settings", "overproduction_percentage_for_work_order", 100)
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
frappe.db.set_single_value(
|
|
||||||
"Manufacturing Settings",
|
|
||||||
"overproduction_percentage_for_work_order",
|
|
||||||
self.overproduction_percentage,
|
|
||||||
)
|
|
||||||
|
|
||||||
def get_bom_raw_materials(self):
|
def get_bom_raw_materials(self):
|
||||||
return {
|
return {
|
||||||
row.item_code: row.qty
|
row.item_code: row.qty
|
||||||
|
|||||||
Reference in New Issue
Block a user