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 :: 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',
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue