Skip to content

Commit d77ea40

Browse files
chg: ✅ Added tests for null tax rates
1 parent 324619c commit d77ea40

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/documents/test_invoice.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,21 @@ def test_empty_object_works():
290290
invoice = Invoice()
291291
assert invoice.total_tax.value is None
292292

293+
def test_null_tax_rates_dont_raise():
294+
invoice = Invoice(
295+
locale="fr",
296+
total_incl=12,
297+
total_excl=15,
298+
invoice_date="2018-12-21",
299+
invoice_number="001",
300+
due_date="2019-01-01",
301+
taxes={(1, 0), (2, 20)},
302+
supplier="Amazon",
303+
payment_details="1231456498799765",
304+
company_number="asdqsdae",
305+
vat_number="1231231232",
306+
orientation=0,
307+
total_tax=3
308+
)
309+
assert invoice.checklist["taxes_match_total_incl"] is False
310+
assert invoice.checklist["taxes_match_total_excl"] is False

0 commit comments

Comments
 (0)