From d7d0dd3ffbf59d83747c90a0388d486ab8698f76 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 29 Apr 2021 12:06:50 +0200 Subject: [PATCH] Use boolean comparision for VAT List amounts The number of decimals is diferent depending on the backend issue10030 --- tests/scenario_reporting_cancelled_invoices.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/scenario_reporting_cancelled_invoices.rst b/tests/scenario_reporting_cancelled_invoices.rst index d6370a6d2e..6ffa4fcebb 100644 --- a/tests/scenario_reporting_cancelled_invoices.rst +++ b/tests/scenario_reporting_cancelled_invoices.rst @@ -128,8 +128,8 @@ Check reports:: >>> with config.set_context(vat_list_context): ... vat_list_records = VatList.find([]) >>> vat_list_record, = vat_list_records - >>> vat_list_record.amount - Decimal('0.0') + >>> vat_list_record.amount == Decimal(0) + True >>> with config.set_context(vat_book_context): ... vat_book_records = VatBook.find([]) >>> len(vat_book_records) @@ -149,8 +149,8 @@ Create another invoice:: >>> with config.set_context(vat_list_context): ... vat_list_records = VatList.find([]) >>> vat_list_record, = vat_list_records - >>> vat_list_record.amount - Decimal('242.0') + >>> vat_list_record.amount == Decimal('242.0') + True >>> with config.set_context(vat_book_context): ... vat_book_records = VatBook.find([]) >>> len(vat_book_records) @@ -164,8 +164,8 @@ Cancel the invoice and check reports:: >>> with config.set_context(vat_list_context): ... vat_list_records = VatList.find([]) >>> vat_list_record, = vat_list_records - >>> vat_list_record.amount - Decimal('0.0') + >>> vat_list_record.amount == Decimal(0) + True >>> with config.set_context(vat_book_context): ... vat_book_records = VatBook.find([]) >>> len(vat_book_records)