test(stock): fix Available Serial No fixture item-code case for Postgres

setUp creates/receives/delivers the item as '_Test Item with Serial No' (lowercase w) but the report
filter used '_Test Item With Serial No' (capital W). MariaDB's case-insensitive collation resolved it,
but Postgres (case-sensitive) matched no item, so the report's 'if items:' guard dropped the item
filter and returned serial-no rows for every item in the window -- an order-dependent, flaky count on
Postgres. Align the filter to the created item's case (a no-op on MariaDB).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Mihir Kandoi
2026-07-01 12:51:54 +05:30
parent cb1642c7f6
commit 9f229d614e

View File

@@ -21,7 +21,7 @@ class TestStockLedgerReeport(ERPNextTestSuite):
company="_Test Company",
from_date=today(),
to_date=add_days(today(), 30),
item_code="_Test Item With Serial No",
item_code="_Test Item with Serial No",
)
def test_available_serial_no(self):