22 lines
527 B
Python
Executable file
22 lines
527 B
Python
Executable file
#!/usr/bin/env python
|
|
import os, sys
|
|
import django
|
|
from django.conf import settings
|
|
|
|
import settings_tests
|
|
|
|
settings.configure(**settings_tests.__dict__)
|
|
django.setup()
|
|
|
|
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)
|
|
|
|
failures = test_runner.run_tests(['cas_server'])
|
|
if failures:
|
|
sys.exit(failures)
|