mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-30 14:20:46 +02:00
tests are correctly discovered for django < 1.6
This commit is contained in:
10
quicktest.py
10
quicktest.py
@ -97,13 +97,13 @@ class QuickDjangoTest(object):
|
||||
# see: http://stackoverflow.com/questions/3841725/how-to-launch-tests-for-django-reusable-app
|
||||
|
||||
try:
|
||||
# Django <= 1.8
|
||||
from django.test.simple import DjangoTestSuiteRunner
|
||||
test_runner = DjangoTestSuiteRunner(verbosity=1)
|
||||
except ImportError:
|
||||
# Django >= 1.8
|
||||
# Django >= 1.6
|
||||
from django.test.runner import DiscoverRunner
|
||||
test_runner = DiscoverRunner(verbosity=1)
|
||||
except ImportError:
|
||||
# Django <= 1.5
|
||||
from django.test.simple import DjangoTestSuiteRunner
|
||||
test_runner = DjangoTestSuiteRunner(verbosity=1)
|
||||
|
||||
if django.VERSION >= (1, 7):
|
||||
django.setup()
|
||||
|
Reference in New Issue
Block a user