changeset e54488d04fb8 in modules/account_es:5.6
details:
https://hg.tryton.org/modules/account_es?cmd=changeset&node=e54488d04fb8
description:
Test VAT List amounts on cancelled invoices scenario
issue10030
review330951002
(grafted from 4dac1726c140225cde05118726bfee76406bd14d)
diffstat:
tests/scenario_reporting_cancelled_invoices.rst | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r 8a0ea25542ad -r e54488d04fb8
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
@@ -116,8 +116,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::
@@ -132,8 +133,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::
@@ -142,5 +144,6 @@
'cancel'
>>> 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