diff --git a/l10n_it_account/tests/test_l10n_it_account.py b/l10n_it_account/tests/test_l10n_it_account.py index d1b94d4c1d3..5982f5c44d3 100644 --- a/l10n_it_account/tests/test_l10n_it_account.py +++ b/l10n_it_account/tests/test_l10n_it_account.py @@ -199,3 +199,12 @@ def test_partially_deductible_balance_recomputation(self): # Check tomorrow's balance self.check_date_balance(self.iva_22I5, tomorrow, -22, -22) + + def check_date_balance(self, tax, date, deductible, not_deductible): + """Compare expected balances with tax's balance in specified date.""" + tax = tax.with_context( + from_date=date, + to_date=date, + ) + self.assertEqual(tax.deductible_balance, deductible) + self.assertEqual(tax.undeductible_balance, not_deductible)