mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 02:55:20 +00:00
test: assert to_date upper bound and use assertIsNone in Bank Clearance Summary
This commit is contained in:
@@ -37,7 +37,7 @@ class TestBankClearanceSummary(ERPNextTestSuite):
|
|||||||
self.assertIsNotNone(row, "Journal Entry not listed in Bank Clearance Summary")
|
self.assertIsNotNone(row, "Journal Entry not listed in Bank Clearance Summary")
|
||||||
self.assertEqual(row[0], "Journal Entry")
|
self.assertEqual(row[0], "Journal Entry")
|
||||||
self.assertEqual(frappe.utils.getdate(row[2]), frappe.utils.getdate("2026-06-01"))
|
self.assertEqual(frappe.utils.getdate(row[2]), frappe.utils.getdate("2026-06-01"))
|
||||||
self.assertEqual(row[4], None) # clearance_date empty -> uncleared
|
self.assertIsNone(row[4]) # clearance_date empty -> uncleared
|
||||||
self.assertEqual(row[5], "Sales - _TC") # against account
|
self.assertEqual(row[5], "Sales - _TC") # against account
|
||||||
self.assertEqual(row[6], 5000) # debit - credit on the bank account
|
self.assertEqual(row[6], 5000) # debit - credit on the bank account
|
||||||
|
|
||||||
@@ -55,6 +55,10 @@ class TestBankClearanceSummary(ERPNextTestSuite):
|
|||||||
# Within range: present
|
# Within range: present
|
||||||
self.assertIsNotNone(self.find_row(self.run_report(), je.name))
|
self.assertIsNotNone(self.find_row(self.run_report(), je.name))
|
||||||
|
|
||||||
# Narrow window after the posting date: excluded
|
# Window entirely after the posting date (from_date lower bound): excluded
|
||||||
data = self.run_report(from_date="2026-07-01", to_date="2026-12-31")
|
after = self.run_report(from_date="2026-07-01", to_date="2026-12-31")
|
||||||
self.assertIsNone(self.find_row(data, je.name))
|
self.assertIsNone(self.find_row(after, je.name))
|
||||||
|
|
||||||
|
# Window ending before the posting date (to_date upper bound): excluded
|
||||||
|
before = self.run_report(from_date="2026-01-01", to_date="2026-06-09")
|
||||||
|
self.assertIsNone(self.find_row(before, je.name))
|
||||||
|
|||||||
Reference in New Issue
Block a user