Skip to content

Commit

Permalink
fix: fixing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Feb 27, 2025
1 parent ccb4bdb commit 9b2b477
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def test_cr_note_flag_to_update_self(self):

expected_data_after_credit_note = [
[100.0, 100.0, 40.0, 0.0, 60.0, si.name],
[0, 0, 100.0, 0.0, -100.0, cr_note.name],
[0, 0, 0, 100.0, -100.0, cr_note.name],
]
self.assertEqual(len(report[1]), 2)
si_row = next(
Expand Down Expand Up @@ -478,13 +478,19 @@ def test_future_payments(self):
report = execute(filters)[1]
self.assertEqual(len(report), 2)

expected_data = {sr.name: [10.0, -10.0, 0.0, -10], si.name: [100.0, 100.0, 10.0, 90.0]}
expected_data = {sr.name: [0.0, 10.0, -10.0, 0.0, -10], si.name: [100.0, 0.0, 100.0, 10.0, 90.0]}

rows = report[:2]
for row in rows:
self.assertEqual(
expected_data[row.voucher_no],
[row.invoiced or row.paid, row.outstanding, row.remaining_balance, row.future_amount],
[
row.invoiced or row.paid,
row.credit_note,
row.outstanding,
row.remaining_balance,
row.future_amount,
],
)

pe.cancel()
Expand Down

0 comments on commit 9b2b477

Please sign in to comment.