Skip to content

Commit

Permalink
[IMP] l10n_nl_tax_statement_icp: increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
astirpe committed Nov 16, 2023
1 parent 09f0df7 commit bf231b5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def test_03_post_final(self):
def test_04_icp_invoice(self):
self._create_test_invoice()
self.invoice_1.partner_id.country_id = self.env.ref("base.be")
self.invoice_1.partner_id.vat = "BE0477472701"
self.statement_1.post()
self.statement_with_icp = self.env["l10n.nl.vat.statement"].create(
{"name": "Statement 1"}
Expand All @@ -90,6 +91,11 @@ def test_04_icp_invoice(self):
self.assertEqual(float(amount_products), icp_line.amount_products)
amount_services = icp_line.format_amount_services
self.assertEqual(float(amount_services), icp_line.amount_services)
self.assertTrue(icp_line.vat)
self.assertTrue(icp_line.format_vat)

# Export XLS without errors
self._check_export_xls(self.statement_with_icp)

def test_05_icp_invoice_service(self):
self.tax_1.name = self.tax_1.name + " dienst"
Expand Down Expand Up @@ -117,6 +123,8 @@ def test_05_icp_invoice_service(self):
self.assertEqual(float(amount_products), icp_line.amount_products)
amount_services = icp_line.format_amount_services
self.assertEqual(float(amount_services), icp_line.amount_services)
self.assertFalse(icp_line.vat)
self.assertFalse(icp_line.format_vat)

# Export XLS without errors
self._check_export_xls(self.statement_with_icp)
Expand Down

0 comments on commit bf231b5

Please sign in to comment.