~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to djangoratings/runtests.py

  • Committer: franku
  • Date: 2018-05-06 08:20:39 UTC
  • mto: This revision was merged to the branch mainline in revision 494.
  • Revision ID: somal@arcor.de-20180506082039-v8n40alffhi2ulct
This is an Attribute error

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
import sys
 
3
 
 
4
from os.path import dirname, abspath
 
5
 
 
6
from django.conf import settings
 
7
 
 
8
if not settings.configured:
 
9
    settings.configure(
 
10
        DATABASE_ENGINE='sqlite3',
 
11
        INSTALLED_APPS=[
 
12
            'django.contrib.auth',
 
13
            'django.contrib.contenttypes',
 
14
            'djangoratings',
 
15
        ]
 
16
    )
 
17
 
 
18
from django.test.simple import run_tests
 
19
 
 
20
 
 
21
def runtests(*test_args):
 
22
    if not test_args:
 
23
        test_args = ['djangoratings']
 
24
    parent = dirname(abspath(__file__))
 
25
    sys.path.insert(0, parent)
 
26
    failures = run_tests(test_args, verbosity=1, interactive=True)
 
27
    sys.exit(failures)
 
28
 
 
29
 
 
30
if __name__ == '__main__':
 
31
    runtests(*sys.argv[1:])