mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-28 01:28:51 +01:00
Merge branch 'master' into django-1.8
This commit is contained in:
commit
ca9d7bc5c4
17
quicktest.py
17
quicktest.py
@ -93,14 +93,27 @@ class QuickDjangoTest(object):
|
|||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Django <= 1.8
|
||||||
|
from django.test.simple import DjangoTestSuiteRunner
|
||||||
|
test_runner = DjangoTestSuiteRunner(verbosity=1)
|
||||||
|
except ImportError:
|
||||||
|
# Django >= 1.8
|
||||||
|
from django.test.runner import DiscoverRunner
|
||||||
|
test_runner = DiscoverRunner(verbosity=1)
|
||||||
|
|
||||||
if django.VERSION >= (1, 7):
|
if django.VERSION >= (1, 7):
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
||||||
from django.test.simple import DjangoTestSuiteRunner
|
failures = test_runner.run_tests(self.apps)
|
||||||
failures = DjangoTestSuiteRunner().run_tests(self.apps, verbosity=1)
|
|
||||||
if failures:
|
if failures:
|
||||||
sys.exit(failures)
|
sys.exit(failures)
|
||||||
|
|
||||||
|
# from django.test.simple import DjangoTestSuiteRunner
|
||||||
|
# failures = DjangoTestSuiteRunner().run_tests(self.apps, verbosity=1)
|
||||||
|
# if failures:
|
||||||
|
# sys.exit(failures)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
"""
|
"""
|
||||||
What do when the user hits this file from the shell.
|
What do when the user hits this file from the shell.
|
||||||
|
Loading…
Reference in New Issue
Block a user