refactor(test): make bom stock calculated deterministic

This commit is contained in:
ruthra kumar
2026-02-17 11:01:47 +05:30
parent c2dea5245d
commit 4d65cb907f

View File

@@ -1,6 +1,8 @@
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom
from erpnext.manufacturing.report.bom_stock_calculated.bom_stock_calculated import (
execute as bom_stock_calculated_report,
@@ -56,6 +58,7 @@ def create_items():
"standard_rate": 100,
"opening_stock": 100,
"last_purchase_rate": 100,
"item_defaults": [{"company": "_Test Company", "default_warehouse": "Stores - _TC"}],
}
).name
rm_item2 = make_item(
@@ -64,6 +67,7 @@ def create_items():
"standard_rate": 200,
"opening_stock": 200,
"last_purchase_rate": 200,
"item_defaults": [{"company": "_Test Company", "default_warehouse": "Stores - _TC"}],
}
).name