mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 13:41:47 +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.overproduction_percentage = frappe.db.get_single_value(
|
||||
"Manufacturing Settings", "overproduction_percentage_for_work_order"
|
||||
)
|
||||
# allow over-production so a Work Order can produce more than planned; ERPNextTestSuite
|
||||
# rolls this back at tearDown, so no manual restore is needed
|
||||
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):
|
||||
return {
|
||||
row.item_code: row.qty
|
||||
|
||||
Reference in New Issue
Block a user