diff --git a/runtests.py b/runtests.py index a1f4d93..b49d38c 100755 --- a/runtests.py +++ b/runtests.py @@ -24,21 +24,14 @@ def runtests(): if not settings.configured: settings.configure(**DEFAULT_SETTINGS) - # Compatibility with Django 1.7's stricter initialization - if hasattr(django, 'setup'): - django.setup() + django.setup() parent = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, parent) - try: - from django.test.runner import DiscoverRunner - runner_class = DiscoverRunner - test_args = ['model_utils.tests'] - except ImportError: - from django.test.simple import DjangoTestSuiteRunner - runner_class = DjangoTestSuiteRunner - test_args = ['tests'] + from django.test.runner import DiscoverRunner + runner_class = DiscoverRunner + test_args = ['model_utils.tests'] failures = runner_class( verbosity=1, interactive=True, failfast=False).run_tests(test_args)