Projet

Général

Profil

0001-run-tests-with-django-1.11-25630.patch

Benjamin Dauvergne, 10 août 2018 11:20

Télécharger (1,55 ko)

Voir les différences:

Subject: [PATCH 1/2] run tests with django 1.11 (#25630)

 setup.py          | 2 +-
 tests/conftest.py | 4 ++++
 tox.ini           | 1 -
 3 files changed, 5 insertions(+), 2 deletions(-)
setup.py
97 97
        'Programming Language :: Python',
98 98
        'Programming Language :: Python :: 2',
99 99
    ],
100
    install_requires=['django>=1.7, <1.9',
100
    install_requires=['django>=1.8,<1.12',
101 101
        'gadjo',
102 102
        'django-ckeditor<4.5.3',
103 103
        'django-haystack<2.8',
tests/conftest.py
20 20

  
21 21
@pytest.fixture
22 22
def app(request):
23
    import django
24

  
23 25
    wtm = django_webtest.WebTestMixin()
26
    if django.VERSION >= (1, 11):
27
        wtm._middleware_setting_name = 'MIDDLEWARE_CLASSES'
24 28
    wtm._patch_settings()
25 29
    request.addfinalizer(wtm._unpatch_settings)
26 30
    return django_webtest.DjangoTestApp()
tox.ini
7 7
  coverage: True
8 8
setenv =
9 9
  DJANGO_SETTINGS_MODULE=welco.settings
10
  PASSERELLE_SETTINGS_FILE=tests/settings.py
11 10
  fast: FAST=--nomigrations
12 11
  coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov=welco/
13 12
deps =
14
-