mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 15:11:52 +00:00
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).
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user