Check sale date against the current date

Storing the date in a variable increases the probability that the date
changes between the start of the scenario and the moment the date is
checked. That is, the test starts at 23:59:50 and ends the next day.
This commit is contained in:
Albert Cervera i Areny 2021-04-23 09:09:31 +02:00
parent abe06ea04d
commit be0bcc5e00

View file

@ -16,7 +16,6 @@ Imports::
... create_chart, get_accounts, create_tax
>>> from trytond.modules.account_invoice.tests.tools import \
... set_fiscalyear_invoice_sequences, create_payment_term
>>> today = datetime.date.today()
Install product_sale_line_relation::
@ -141,5 +140,5 @@ Search Sale Lines::
>>> line1.reload()
>>> line1.sale_state
'processing'
>>> line1.sale_date == today
>>> line1.sale_date == datetime.date.today()
True