run tests with django 1.11 (#25630)
This commit is contained in:
parent
aabe7e62b0
commit
7388218208
2
setup.py
2
setup.py
|
@ -97,7 +97,7 @@ setup(
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 2',
|
'Programming Language :: Python :: 2',
|
||||||
],
|
],
|
||||||
install_requires=['django>=1.7, <1.9',
|
install_requires=['django>=1.8,<1.12',
|
||||||
'gadjo',
|
'gadjo',
|
||||||
'django-ckeditor<4.5.3',
|
'django-ckeditor<4.5.3',
|
||||||
'django-haystack<2.8',
|
'django-haystack<2.8',
|
||||||
|
|
|
@ -20,7 +20,11 @@ import django_webtest
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def app(request):
|
def app(request):
|
||||||
|
import django
|
||||||
|
|
||||||
wtm = django_webtest.WebTestMixin()
|
wtm = django_webtest.WebTestMixin()
|
||||||
|
if django.VERSION >= (1, 11):
|
||||||
|
wtm._middleware_setting_name = 'MIDDLEWARE_CLASSES'
|
||||||
wtm._patch_settings()
|
wtm._patch_settings()
|
||||||
request.addfinalizer(wtm._unpatch_settings)
|
request.addfinalizer(wtm._unpatch_settings)
|
||||||
return django_webtest.DjangoTestApp()
|
return django_webtest.DjangoTestApp()
|
||||||
|
|
1
tox.ini
1
tox.ini
|
@ -7,7 +7,6 @@ usedevelop =
|
||||||
coverage: True
|
coverage: True
|
||||||
setenv =
|
setenv =
|
||||||
DJANGO_SETTINGS_MODULE=welco.settings
|
DJANGO_SETTINGS_MODULE=welco.settings
|
||||||
PASSERELLE_SETTINGS_FILE=tests/settings.py
|
|
||||||
fast: FAST=--nomigrations
|
fast: FAST=--nomigrations
|
||||||
coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov=welco/
|
coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov=welco/
|
||||||
deps =
|
deps =
|
||||||
|
|
Loading…
Reference in New Issue