We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49b3b2b commit 791dafaCopy full SHA for 791dafa
tests/documents/test_financial_doc.py
@@ -286,3 +286,11 @@ def test_compare_4(financial_doc_object_from_scratch):
286
def test_empty_object_works():
287
financial_doc = FinancialDocument()
288
assert financial_doc.total_tax.value is None
289
+
290
291
+def test_invoice_or_receipt_get_same_field_types(receipt_pred, invoice_pred):
292
+ financial_doc_from_receipt = FinancialDocument(receipt_pred)
293
+ financial_doc_from_invoice = FinancialDocument(invoice_pred)
294
+ assert set(dir(financial_doc_from_invoice)) == set(dir(financial_doc_from_receipt))
295
+ for key in dir(financial_doc_from_receipt):
296
+ assert type(getattr(financial_doc_from_receipt, key)) == type(getattr(financial_doc_from_invoice, key))
0 commit comments