From 6c6e45157bf223b59d62115ee172f26adb23c61f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 17 Aug 2017 18:26:52 +0530 Subject: [PATCH] Fixed test case for replace bom --- .../doctype/bom_update_tool/test_bom_update_tool.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py index b0851a6780..154addf14e 100644 --- a/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py +++ b/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py @@ -22,4 +22,9 @@ class TestBOMUpdateTool(unittest.TestCase): update_tool.replace_bom() self.assertFalse(frappe.db.sql("select name from `tabBOM Item` where bom_no=%s", current_bom)) - self.assertTrue(frappe.db.sql("select name from `tabBOM Item` where bom_no=%s", bom_doc.name)) \ No newline at end of file + self.assertTrue(frappe.db.sql("select name from `tabBOM Item` where bom_no=%s", bom_doc.name)) + + # reverse, as it affects other testcases + update_tool.current_bom = bom_doc.name + update_tool.new_bom = current_bom + update_tool.replace_bom() \ No newline at end of file