From a945484af4f69c8b698a2283f4078b99c38df039 Mon Sep 17 00:00:00 2001 From: marination Date: Wed, 30 Mar 2022 18:20:54 +0530 Subject: [PATCH] test: Added test for 2 more validations - Covers full validate function --- .../doctype/bom_update_log/test_bom_update_log.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py index d1da18d0ab..47efea961b 100644 --- a/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py +++ b/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py @@ -46,6 +46,12 @@ class TestBOMUpdateLog(FrappeTestCase): with self.assertRaises(BOMMissingError): enqueue_replace_bom(boms={}) + with self.assertRaises(frappe.ValidationError): + enqueue_replace_bom(boms=frappe._dict(current_bom=self.boms.new_bom, new_bom=self.boms.new_bom)) + + with self.assertRaises(frappe.ValidationError): + enqueue_replace_bom(boms=frappe._dict(current_bom=self.boms.new_bom, new_bom="Dummy BOM")) + def test_bom_update_log_queueing(self): "Test if BOM Update Log is created and queued."