2014-10-02 14:39:47 +04:00
|
|
|
# This file mainly exists to allow python setup.py test to work.
|
2015-04-28 11:22:08 +03:00
|
|
|
# flake8: noqa
|
2014-10-01 16:13:21 +04:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2014-05-03 01:50:54 +04:00
|
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_settings'
|
|
|
|
test_dir = os.path.dirname(__file__)
|
|
|
|
sys.path.insert(0, test_dir)
|
|
|
|
|
2014-10-02 14:39:47 +04:00
|
|
|
import django
|
2014-05-03 01:50:54 +04:00
|
|
|
from django.test.utils import get_runner
|
|
|
|
from django.conf import settings
|
2014-05-05 19:57:47 +04:00
|
|
|
|
2014-05-03 01:50:54 +04:00
|
|
|
|
|
|
|
def runtests():
|
|
|
|
TestRunner = get_runner(settings)
|
|
|
|
test_runner = TestRunner(verbosity=1, interactive=True)
|
2014-10-02 14:39:47 +04:00
|
|
|
if hasattr(django, 'setup'):
|
|
|
|
django.setup()
|
2014-05-03 01:50:54 +04:00
|
|
|
failures = test_runner.run_tests(['rest_auth'])
|
|
|
|
sys.exit(bool(failures))
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
runtests()
|