From d2255325956326e4c3501554f6baaf04bbcb7619 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 23 Jun 2026 13:20:58 +0530 Subject: [PATCH] test(manufacturing): make MPS lead-time fixture idempotent Delete any existing Item Lead Time for the test item before inserting, so the test is re-runnable on a shared database (addresses review feedback). --- .../test_master_production_schedule.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/manufacturing/doctype/master_production_schedule/test_master_production_schedule.py b/erpnext/manufacturing/doctype/master_production_schedule/test_master_production_schedule.py index faeb050a73b..606ba2dba5a 100644 --- a/erpnext/manufacturing/doctype/master_production_schedule/test_master_production_schedule.py +++ b/erpnext/manufacturing/doctype/master_production_schedule/test_master_production_schedule.py @@ -16,6 +16,8 @@ class TestMasterProductionSchedule(ERPNextTestSuite): manufacturing_time_in_mins is an Int column; integer/integer division truncates on PostgreSQL (720/1440 -> 0) while MariaDB yields 0.5, changing the planned release date.""" item = make_item("_Test MPS Lead Time Item", {"is_stock_item": 1}).name + # idempotent across re-runs / a shared CI database + frappe.db.delete("Item Lead Time", {"item_code": item}) frappe.get_doc( { "doctype": "Item Lead Time",