From 5b50d5abf29b5d320a64cbd3a78ce2a77de46fa7 Mon Sep 17 00:00:00 2001 From: marination <25857446+marination@users.noreply.github.com> Date: Tue, 13 May 2025 14:42:57 +0200 Subject: [PATCH] fix: Broken test + use `super()` appropriately - test: Remove `test_bom_qty`. It had invalid code. Its been removed from develop. There wasn't a strong case being tested. --- .../request_for_quotation.py | 2 +- erpnext/manufacturing/doctype/bom/test_bom.py | 22 ------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index c09e89c9c58..650251ed7de 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -64,7 +64,7 @@ class RequestforQuotation(BuyingController): def validate(self): self.validate_duplicate_supplier() self.validate_supplier_list() - super(RequestforQuotation, self).validate_qty_is_not_zero() + super().validate_qty_is_not_zero() validate_for_items(self) super().set_qty_as_per_stock_uom() self.update_email_id() diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py index a06fe505757..83e722cce50 100644 --- a/erpnext/manufacturing/doctype/bom/test_bom.py +++ b/erpnext/manufacturing/doctype/bom/test_bom.py @@ -26,28 +26,6 @@ test_dependencies = ["Item", "Quality Inspection Template"] class TestBOM(FrappeTestCase): - @timeout - def test_bom_qty(self): - from erpnext.stock.doctype.item.test_item import make_item - - # No error. - bom = frappe.new_doc("BOM") - item = make_item(properties={"is_stock_item": 1}) - bom.item = fg_item.item_code - bom.quantity = 1 - bom.append( - "items", - { - "item_code": bom_item.item_code, - "qty": 0, - "uom": bom_item.stock_uom, - "stock_uom": bom_item.stock_uom, - "rate": 100.0, - }, - ) - bom.save() - self.assertEqual(bom.items[0].qty, 0) - @timeout def test_get_items(self): from erpnext.manufacturing.doctype.bom.bom import get_bom_items_as_dict