changeset 4dac1726c140 in modules/account_es:5.8 details: https://hg.tryton.org/modules/account_es?cmd=changeset&node=4dac1726c140 description: Test VAT List amounts on cancelled invoices scenario
issue10030 review330951002 diffstat: tests/scenario_reporting_cancelled_invoices.rst | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diffs (36 lines): diff -r 4707bb15cc96 -r 4dac1726c140 tests/scenario_reporting_cancelled_invoices.rst --- a/tests/scenario_reporting_cancelled_invoices.rst Thu Apr 29 11:20:15 2021 +0200 +++ b/tests/scenario_reporting_cancelled_invoices.rst Fri May 07 10:09:26 2021 +0200 @@ -117,8 +117,9 @@ >>> with config.set_context(context): ... vat_list_records = VatList.find([]) - >>> len(vat_list_records) - 0 + >>> vat_list_record, = vat_list_records + >>> vat_list_record.amount == Decimal(0) + True Create another invoice:: @@ -133,8 +134,9 @@ >>> invoice.click('post') >>> with config.set_context(context): ... vat_list_records = VatList.find([]) - >>> len(vat_list_records) - 1 + >>> vat_list_record, = vat_list_records + >>> vat_list_record.amount == Decimal('242.0') + True Cancel the invoice and check VAT List is empty:: @@ -143,5 +145,6 @@ 'cancelled' >>> with config.set_context(context): ... vat_list_records = VatList.find([]) - >>> len(vat_list_records) - 0 + >>> vat_list_record, = vat_list_records + >>> vat_list_record.amount == Decimal(0) + True