tests: drop partial sqlite support
This commit is contained in:
parent
6d064a2c22
commit
2cc2cf4200
|
@ -214,13 +214,10 @@ def superuser_or_admin(request, superuser, admin):
|
|||
|
||||
@pytest.fixture
|
||||
def concurrency(settings):
|
||||
'''Select a level of concurrency based on the db, sqlite3 is less robust
|
||||
thant postgres due to its transaction lock timeout of 5 seconds.
|
||||
'''Select a level of concurrency based on the db. Currently only
|
||||
postgresql is supported.
|
||||
'''
|
||||
if 'sqlite' in settings.DATABASES['default']['ENGINE']:
|
||||
return 20
|
||||
else:
|
||||
return 100
|
||||
return 100
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
@ -20,10 +20,7 @@ from authentic2.models import Attribute, AttributeValue
|
|||
|
||||
import threading
|
||||
|
||||
from utils import skipif_sqlite
|
||||
|
||||
|
||||
@skipif_sqlite
|
||||
def test_attribute_value_uniqueness(migrations, transactional_db, simple_user, concurrency):
|
||||
#from django.db.transaction import set_autocommit
|
||||
# disabled default attributes
|
||||
|
|
|
@ -25,15 +25,12 @@ import pytest
|
|||
from authentic2.manager.user_import import UserImport, Report
|
||||
from authentic2.models import Attribute
|
||||
|
||||
from utils import skipif_sqlite
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def profile(transactional_db):
|
||||
Attribute.objects.create(name='phone', kind='phone_number', label='Numéro de téléphone')
|
||||
|
||||
|
||||
@skipif_sqlite
|
||||
def test_user_import(media, transactional_db, profile):
|
||||
content = '''email key verified,first_name,last_name,phone no-create
|
||||
tnoel@entrouvert.com,Thomas,Noël,1234
|
||||
|
|
|
@ -34,7 +34,7 @@ from authentic2.a2_rbac.utils import get_default_ou
|
|||
from authentic2.manager import user_import
|
||||
|
||||
|
||||
from utils import login, get_link_from_mail, skipif_sqlite
|
||||
from utils import login, get_link_from_mail
|
||||
|
||||
OU = get_ou_model()
|
||||
|
||||
|
@ -125,7 +125,6 @@ def test_search_by_attribute(app, simple_user, admin):
|
|||
assert visible_users(response) == {simple_user.username}
|
||||
|
||||
|
||||
@skipif_sqlite
|
||||
def test_export_csv(settings, app, superuser, django_assert_num_queries):
|
||||
AT_COUNT = 30
|
||||
USER_COUNT = 2000
|
||||
|
@ -159,7 +158,6 @@ def test_export_csv(settings, app, superuser, django_assert_num_queries):
|
|||
assert len(table[0]) == (15 + AT_COUNT)
|
||||
|
||||
|
||||
@skipif_sqlite
|
||||
def test_export_csv_disabled_attribute(settings, app, superuser):
|
||||
attr = Attribute.objects.create(name='attr', label='Attr', kind='string')
|
||||
attr_d = Attribute.objects.create(name='attrd', label='Attrd', kind='string')
|
||||
|
@ -219,7 +217,6 @@ def test_user_table(app, admin, user_ou1, ou1):
|
|||
assert response.pyquery('td.username')
|
||||
|
||||
|
||||
@skipif_sqlite
|
||||
@pytest.mark.parametrize('encoding', ['utf-8', 'cp1252', 'iso-8859-15'])
|
||||
def test_user_import(encoding, transactional_db, app, admin, ou1, admin_ou1, media):
|
||||
Attribute.objects.create(name='phone', kind='phone_number', label='Numéro de téléphone')
|
||||
|
@ -378,7 +375,6 @@ def import_csv(csv_content, app):
|
|||
return response
|
||||
|
||||
|
||||
@skipif_sqlite
|
||||
def test_user_import_attributes(transactional_db, app, admin, media):
|
||||
Attribute.objects.create(name='more', kind='string', label='Signe particulier')
|
||||
Attribute.objects.create(name='title', kind='title', label='Titre')
|
||||
|
@ -440,7 +436,6 @@ def test_detail_view(app, admin, simple_user):
|
|||
assert response.pyquery('.a2-manager-user-deletion')
|
||||
|
||||
|
||||
@skipif_sqlite
|
||||
def test_user_import_row_error_display(transactional_db, app, admin, media):
|
||||
User.objects.create(first_name='Elliott', last_name='1', ou=get_default_ou())
|
||||
User.objects.create(first_name='Elliott', last_name='2', ou=get_default_ou())
|
||||
|
|
|
@ -33,10 +33,6 @@ from django.utils.six.moves.urllib import parse as urlparse
|
|||
from authentic2 import utils
|
||||
|
||||
|
||||
skipif_sqlite = pytest.mark.skipif('sqlite' in settings.DATABASES['default']['ENGINE'],
|
||||
reason='this test does not work with sqlite')
|
||||
|
||||
|
||||
def login(app, user, path=None, password=None, remember_me=None, args=None, kwargs=None):
|
||||
if path:
|
||||
args = args or []
|
||||
|
|
Loading…
Reference in New Issue