refactor(test): make bom deterministic

This commit is contained in:
ruthra kumar
2026-02-18 16:36:35 +05:30
parent 7fea5a5ca2
commit 19e03ccdde
2 changed files with 7 additions and 5 deletions

View File

@@ -654,7 +654,7 @@ class TestBOM(ERPNextTestSuite):
from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom
bom = make_bom(item=fg_item, raw_materials=[rm_item], do_not_save=True)
bom = make_bom(item=fg_item, raw_materials=[rm_item], currency="INR", do_not_save=True)
bom.rm_cost_as_per = "Last Purchase Rate"
bom.save()

View File

@@ -36,15 +36,17 @@
"quantity": 1.0
},
{
"scrap_items":[
"secondary_items":[
{
"amount": 2000.0,
"doctype": "BOM Scrap Item",
"doctype": "BOM Secondary Item",
"item_code": "_Test Item Home Desktop 100",
"parentfield": "scrap_items",
"parentfield": "secondary_items",
"stock_qty": 1.0,
"rate": 2000.0,
"stock_uom": "_Test UOM"
"stock_uom": "_Test UOM",
"type": "Scrap",
"is_legacy": 1
}
],
"items": [