aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJannis Leidel2013-12-09 17:46:41 +0100
committerJannis Leidel2013-12-09 17:46:47 +0100
commit4e37f8bd430d30807c56372a372e570fe346c0fb (patch)
treebb6a6f99ed98bc30c4a6074e966d46298d87d1cd
parente75309b712537f3ee53005bf6330057c9640be21 (diff)
downloaddjango-debug-toolbar-4e37f8bd430d30807c56372a372e570fe346c0fb.tar.bz2
Use django-discover-runner on older Djangos.
-rw-r--r--requirements_dev.txt1
-rw-r--r--tests/settings.py5
-rw-r--r--tests/tests.py14
-rw-r--r--tox.ini1
4 files changed, 7 insertions, 14 deletions
diff --git a/requirements_dev.txt b/requirements_dev.txt
index 8d7af92..74ef847 100644
--- a/requirements_dev.txt
+++ b/requirements_dev.txt
@@ -13,6 +13,7 @@ coverage
flake8
selenium
tox
+django-discover-runner
# Documentation
diff --git a/tests/settings.py b/tests/settings.py
index 9ff9fb6..68346ff 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -1,6 +1,8 @@
"""Django settings for tests."""
import os
+import django
+
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
@@ -64,3 +66,6 @@ DEBUG_TOOLBAR_CONFIG = {
# Django's test client sets wsgi.multiprocess to True inappropriately
'RENDER_PANELS': False,
}
+
+if django.VERSION[:2] < (1, 6):
+ TEST_RUNNER = 'discover_runner.DiscoverRunner'
diff --git a/tests/tests.py b/tests/tests.py
deleted file mode 100644
index ca77f5b..0000000
--- a/tests/tests.py
+++ /dev/null
@@ -1,14 +0,0 @@
-import django
-
-if django.VERSION[:2] < (1, 6): # unittest-style discovery isn't available
- from .commands.test_debugsqlshell import * # noqa
- from .panels.test_cache import * # noqa
- from .panels.test_logging import * # noqa
- from .panels.test_profiling import * # noqa
- from .panels.test_redirects import * # noqa
- from .panels.test_request import * # noqa
- from .panels.test_sql import * # noqa
- from .panels.test_staticfiles import * # noqa
- from .panels.test_template import * # noqa
- from .test_integration import * # noqa
- from .test_utils import * # noqa
diff --git a/tox.ini b/tox.ini
index 00941f4..98c487e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,6 +17,7 @@ commands = make test
deps =
selenium
sqlparse
+ django-discover-runner
setenv =
PYTHONPATH = {toxinidir}
whitelist_externals = make