From 9fcb730090b444cafe58415a0f409371693f96db Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 16 Jun 2026 20:09:44 +0530 Subject: [PATCH] fix: test case (cherry picked from commit e183e326193f0e7d92b80bee565e32d586171d12) --- .../repost_item_valuation/test_repost_item_valuation.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py index 42f7a539569..8241ca6b6ed 100644 --- a/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/test_repost_item_valuation.py @@ -22,9 +22,6 @@ from erpnext.tests.utils import ERPNextTestSuite class TestRepostItemValuation(ERPNextTestSuite, StockTestMixin): - def tearDown(self): - frappe.flags.dont_execute_stock_reposts = False - def test_repost_time_slot(self): repost_settings = frappe.get_doc("Stock Reposting Settings") @@ -198,6 +195,7 @@ class TestRepostItemValuation(ERPNextTestSuite, StockTestMixin): @ERPNextTestSuite.change_settings("Stock Reposting Settings", {"item_based_reposting": 0}) def test_prevention_of_cancelled_transaction_riv(self): frappe.flags.dont_execute_stock_reposts = True + self.addCleanup(frappe.flags.pop, "dont_execute_stock_reposts") item = make_item() warehouse = "_Test Warehouse - _TC"