From 2da79545384850972df7c71a3784b30d6a03707e Mon Sep 17 00:00:00 2001 From: Borruso Date: Fri, 17 Jan 2025 16:46:46 +0100 Subject: [PATCH] xx --- l10n_it_account/tests/test_l10n_it_account.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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)