From c77d97d950bcf6fab0061519922c4800e06ff711 Mon Sep 17 00:00:00 2001 From: Raphaƫl Barrois Date: Thu, 2 Apr 2015 09:48:53 +0200 Subject: Fix imports for Django 1.8 --- tests/test_django.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_django.py b/tests/test_django.py index ac52769..9da99cc 100644 --- a/tests/test_django.py +++ b/tests/test_django.py @@ -53,7 +53,10 @@ if django is not None: from django import test as django_test from django.conf import settings from django.db import models as django_models - from django.test import simple as django_test_simple + if django.VERSION <= (1, 8, 0): + from django.test.simple import DjangoTestSuiteRunner + else: + from django.test.runner import DiscoverRunner as DjangoTestSuiteRunner from django.test import utils as django_test_utils from django.db.models import signals from .djapp import models @@ -71,7 +74,7 @@ def setUpModule(): if django is None: # pragma: no cover raise unittest.SkipTest("Django not installed") django_test_utils.setup_test_environment() - runner = django_test_simple.DjangoTestSuiteRunner() + runner = DjangoTestSuiteRunner() runner_state = runner.setup_databases() test_state.update({ 'runner': runner, -- cgit v1.2.3