From 57e3ae902ceaa3dc04086654502f9578ff3a541c Mon Sep 17 00:00:00 2001 From: Andy Baker Date: Sat, 4 Jul 2015 12:49:53 +0100 Subject: [PATCH] get tox test working with Django1.8. --- test_proj/settings.py | 2 +- test_proj/test_app/fixtures/{initial_data.json => users.json} | 0 test_proj/test_app/tests.py | 2 +- tox.ini | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename test_proj/test_app/fixtures/{initial_data.json => users.json} (100%) diff --git a/test_proj/settings.py b/test_proj/settings.py index 126694b..1601bff 100644 --- a/test_proj/settings.py +++ b/test_proj/settings.py @@ -148,7 +148,7 @@ try: TEST_RUNNER = 'django_coverage.coverage_runner.CoverageRunner' COVERAGE_REPORT_HTML_OUTPUT_DIR = os.path.join(PROJECT_PATH, '_coverage') except ImportError: - TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner' + TEST_RUNNER = 'django.test.runner.DiscoverRunner' ADMIN_TOOLS_INDEX_DASHBOARD = 'test_proj.dashboard.CustomIndexDashboard' diff --git a/test_proj/test_app/fixtures/initial_data.json b/test_proj/test_app/fixtures/users.json similarity index 100% rename from test_proj/test_app/fixtures/initial_data.json rename to test_proj/test_app/fixtures/users.json diff --git a/test_proj/test_app/tests.py b/test_proj/test_app/tests.py index fb826d2..b0f16d1 100644 --- a/test_proj/test_app/tests.py +++ b/test_proj/test_app/tests.py @@ -3,7 +3,7 @@ import sys class AdminBasicTest(TestCase): - fixtures = ['initial_data.json'] + fixtures = ['users.json'] def test_admin_loads(self): for (username, password) in (('superuser', '123'), ('staff', '123')): diff --git a/tox.ini b/tox.ini index f5224b0..c4f1288 100644 --- a/tox.ini +++ b/tox.ini @@ -24,4 +24,4 @@ deps = [testenv] commands = python -V - ./runtests.sh + python test_proj/manage.py test