From a68c101e3b8f652695e054f393c1c07f9cff4adc Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Tue, 8 Dec 2020 22:24:34 +0100 Subject: [PATCH] tox: do not run hobo tests agains django 2.2 (#49103) --- tests/settings.py | 7 ++++++- tox.ini | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/settings.py b/tests/settings.py index 8253385..135fb4a 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -1,7 +1,12 @@ import os # Add corbo hobo agent -INSTALLED_APPS = ('corbo.hobo_agent', 'hobo.agent.common') + INSTALLED_APPS +try: + import hobo + INSTALLED_APPS = ('corbo.hobo_agent', 'hobo.agent.common') + INSTALLED_APPS +except ImportError: + pass + REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = ['rest_framework.authentication.BasicAuthentication'] diff --git a/tox.ini b/tox.ini index 5efcc43..1ae8edb 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ setenv = deps = django111: django>=1.11,<1.12 django22: django>=2.2,<2.3 - https://git.entrouvert.org/hobo.git/snapshot/hobo-master.tar.gz + django111: https://git.entrouvert.org/hobo.git/snapshot/hobo-master.tar.gz pytest-cov pytest-django pytest @@ -27,4 +27,5 @@ deps = mock<4 psycopg2-binary commands = - py.test {env:COVERAGE:} {posargs:tests/} + django111: py.test {env:COVERAGE:} {posargs:tests/} + django22: py.test {env:COVERAGE:} {posargs:--ignore=tests/test_hobo_notify.py tests/}