Compare commits

...

2 Commits

Author SHA1 Message Date
Thomas NOËL b7f6718b7e tox: SETUPTOOLS_USE_DISTUTILS=stdlib
gitea/eopayment/pipeline/head Build started... Details
2020-09-01 11:21:07 +02:00
Thomas NOËL 736b20e162 tests: use utcnow in TIPI refdet verifications (#46237) 2020-09-01 00:49:49 +02:00
2 changed files with 5 additions and 3 deletions

View File

@ -70,7 +70,7 @@ def test_tipi_no_orderid_no_refdet():
assert parsed_qs['mel'] == ['info@entrouvert.com']
assert parsed_qs['numcli'] == ['12345']
assert parsed_qs['exer'] == ['9999']
assert parsed_qs['refdet'][0].startswith(datetime.datetime.now().strftime('%Y%m%d'))
assert parsed_qs['refdet'][0].startswith(datetime.datetime.utcnow().strftime('%Y%m%d'))
def test_tipi_orderid_refdef_compatible():
@ -110,6 +110,6 @@ def test_tipi_orderid_not_refdef_compatible():
assert parsed_qs['saisie'] == ['A']
assert parsed_qs['mel'] == ['info@entrouvert.com']
assert parsed_qs['numcli'] == ['12345']
assert parsed_qs['refdet'][0].startswith(datetime.datetime.now().strftime('%Y%m%d'))
assert parsed_qs['refdet'][0].startswith(datetime.datetime.utcnow().strftime('%Y%m%d'))
assert 'coucou' in parsed_qs['objet'][0]
assert 'F12-12-12' in parsed_qs['objet'][0]

View File

@ -9,10 +9,12 @@ toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/eopayment/{env:BRANCH_NAME:}
[testenv]
# django.contrib.auth is not tested it does not work with our templates
usedevelop = True
setenv =
SETUPTOOLS_USE_DISTUTILS=stdlib
commands =
py2: py.test {posargs: --junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=eopayment/ tests}
py3: py.test {posargs: --junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=eopayment/ tests}
usedevelop = True
deps = coverage
pytest
pytest-freezegun