Delay computation of dates to prevent issues when executing tests near midnight.
This commit is contained in:
parent
aeb62e34a1
commit
ba37df2174
2
setup.py
2
setup.py
|
@ -76,7 +76,7 @@ requires += get_requires('depends')
|
|||
|
||||
tests_require = [
|
||||
get_require_version('proteus'),
|
||||
|
||||
|
||||
]
|
||||
tests_require += get_requires('extras_depend')
|
||||
requires += [get_require_version('trytond_account_invoice')]
|
||||
|
|
|
@ -16,15 +16,13 @@ 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()
|
||||
>>> tomorrow = today + datetime.timedelta(days=1)
|
||||
>>> yesterday = today - datetime.timedelta(days=1)
|
||||
|
||||
Install account_invoice_line_origin, purchase_invoice_line_standalone::
|
||||
|
||||
>>> config = activate_modules(['account_invoice_line_origin',
|
||||
... 'purchase_invoice_line_standalone', 'sale'])
|
||||
|
||||
|
||||
Create company::
|
||||
|
||||
>>> _ = create_company()
|
||||
|
@ -86,6 +84,12 @@ Create payment term::
|
|||
>>> payment_term = create_payment_term()
|
||||
>>> payment_term.save()
|
||||
|
||||
Compute dates::
|
||||
|
||||
>>> today = datetime.date.today()
|
||||
>>> tomorrow = today + datetime.timedelta(days=1)
|
||||
>>> yesterday = today - datetime.timedelta(days=1)
|
||||
|
||||
Purchases::
|
||||
|
||||
>>> Purchase = Model.get('purchase.purchase')
|
||||
|
|
Loading…
Reference in New Issue