tests: don't use pgconn existence to check for SQL mode

This commit is contained in:
Frédéric Péters 2017-09-28 14:00:59 +02:00
parent b7be6a9aa5
commit 5a72dd1e3b
2 changed files with 3 additions and 3 deletions

View File

@ -1382,7 +1382,7 @@ def test_form_archive(pub):
create_superuser(pub)
create_role()
if getattr(pub, 'pgconn', None):
if pub.is_using_postgresql():
# this doesn't exist in SQL
pytest.skip('no archive in SQL mode')
return

View File

@ -262,7 +262,7 @@ def test_backoffice_listing(pub):
resp = app.get('/backoffice/management/form-title/')
resp.forms[0]['filter'] = 'all'
resp = resp.forms[0].submit()
if getattr(pub, 'pgconn', None):
if pub.is_using_postgresql():
assert resp.body.count('data-link') == 20
else:
# not using sql -> no pagination
@ -272,7 +272,7 @@ def test_backoffice_listing(pub):
resp = app.get('/backoffice/management/form-title/')
resp.forms[0]['filter'] = 'done'
resp = resp.forms[0].submit()
if getattr(pub, 'pgconn', None):
if pub.is_using_postgresql():
assert resp.body.count('data-link') == 20
resp = resp.click('Next Page')
assert resp.body.count('data-link') == 13