diff --git a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py index 053c7ba7673..221ace4008d 100644 --- a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py @@ -1402,9 +1402,11 @@ class TestProductionPlan(FrappeTestCase): self.assertEqual(after_qty, before_qty) - completed_plans = get_non_completed_production_plans() + # Plan submission cached this list before the Work Orders updated ordered quantities. + frappe.local.request_cache.clear() + non_completed_plans = get_non_completed_production_plans() for plan in plans: - self.assertFalse(plan in completed_plans) + self.assertNotIn(plan, non_completed_plans) def test_resered_qty_for_production_plan_for_material_requests_with_multi_UOM(self): from erpnext.stock.utils import get_or_make_bin