run tests with django 1.11 (#25630)

This commit is contained in:
Benjamin Dauvergne 2018-08-10 11:18:32 +02:00 committed by Frédéric Péters
parent aabe7e62b0
commit 7388218208
3 changed files with 5 additions and 2 deletions

View File

@ -97,7 +97,7 @@ setup(
'Programming Language :: Python',
'Programming Language :: Python :: 2',
],
install_requires=['django>=1.7, <1.9',
install_requires=['django>=1.8,<1.12',
'gadjo',
'django-ckeditor<4.5.3',
'django-haystack<2.8',

View File

@ -20,7 +20,11 @@ import django_webtest
@pytest.fixture
def app(request):
import django
wtm = django_webtest.WebTestMixin()
if django.VERSION >= (1, 11):
wtm._middleware_setting_name = 'MIDDLEWARE_CLASSES'
wtm._patch_settings()
request.addfinalizer(wtm._unpatch_settings)
return django_webtest.DjangoTestApp()

View File

@ -7,7 +7,6 @@ usedevelop =
coverage: True
setenv =
DJANGO_SETTINGS_MODULE=welco.settings
PASSERELLE_SETTINGS_FILE=tests/settings.py
fast: FAST=--nomigrations
coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov=welco/
deps =