From ae0cfbd3e156a9ba087549e9fda65b9a757d7436 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 3 Jul 2026 17:06:51 +0530 Subject: [PATCH] test: assert the saved closing entry exists rather than a truthy name --- .../doctype/stock_closing_entry/test_stock_closing_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py b/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py index 09670f0ff8c..2f47551ff74 100644 --- a/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py +++ b/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py @@ -87,5 +87,5 @@ class TestStockClosingEntryDuplicate(ERPNextTestSuite): def test_non_overlapping_range_is_allowed(self): self.submit_closing(self.make_closing("2026-01-01", "2026-03-31")) later = self.make_closing("2026-04-01", "2026-06-30") - later.insert() - self.assertTrue(later.name) + later.insert() # would raise if validate_duplicate wrongly flagged it as overlapping + self.assertTrue(frappe.db.exists("Stock Closing Entry", later.name))