def test_compare_3(financial_doc_object_from_scratch):
    # Compare financial doc from class
    benchmark = FinancialDocument.compare(financial_doc_object_from_scratch,
                                          financial_doc_object_from_scratch)
    for key in benchmark.keys():
        if "__acc__" in key:
            assert benchmark[key] is True
def test_compare_2(financial_doc_from_invoice_object,
                   financial_doc_from_invoice_object_all_na):
    # Compare full object and empty object
    benchmark = FinancialDocument.compare(
        financial_doc_from_invoice_object,
        financial_doc_from_invoice_object_all_na)
    for key in set(benchmark.keys()) - {"time"}:
        assert benchmark[key] is False
def test_compare_4(financial_doc_object_from_scratch):
    # Compare financial doc from class with empty taxes
    financial_doc_object_from_scratch.taxes = []
    benchmark = FinancialDocument.compare(financial_doc_object_from_scratch,
                                          financial_doc_object_from_scratch)
    for key in benchmark.keys():
        if "__acc__" in key:
            assert benchmark[key] is True
        elif "__pre__" in key:
            assert benchmark[key] in [True, None]
def test_compare_1(financial_doc_from_invoice_object):
    # Compare same object must return all True
    benchmark = FinancialDocument.compare(financial_doc_from_invoice_object,
                                          financial_doc_from_invoice_object)
    for value in benchmark.values():
        assert value is True