From 3de80ec640531fca0f5dabad4124659adc9439dc Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Sat, 13 Dec 2025 13:39:19 +0530 Subject: [PATCH] fix: test cases --- .../doctype/bom_creator/test_bom_creator.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py index cfcd288e098..b277ca3c483 100644 --- a/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py +++ b/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py @@ -63,8 +63,10 @@ class TestBOMCreator(IntegrationTestCase): fg_valuation_rate = 0 for row in doc.items: - if not row.is_expandable: + if row.fg_item == final_product: fg_valuation_rate += row.amount + + if not row.is_expandable: self.assertEqual(row.fg_item, "Frame Assembly") self.assertEqual(row.fg_reference_id, doc.items[0].name) @@ -105,8 +107,10 @@ class TestBOMCreator(IntegrationTestCase): fg_valuation_rate = 0 for row in doc.items: - if not row.is_expandable: + if row.fg_item == final_product: fg_valuation_rate += row.amount + + if not row.is_expandable: self.assertEqual(row.fg_item, "Bicycle") self.assertEqual(row.fg_reference_id, doc.name) @@ -170,8 +174,10 @@ class TestBOMCreator(IntegrationTestCase): fg_valuation_rate = 0 for row in doc.items: - if not row.is_expandable: + if row.fg_item == final_product: fg_valuation_rate += row.amount + + if not row.is_expandable: self.assertEqual(row.fg_item, "Pedal Assembly") self.assertEqual(row.qty, 2.0) self.assertEqual(row.fg_reference_id, doc.items[0].name)