-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests.py
executable file
·42 lines (35 loc) · 1.03 KB
/
run_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
# Short way to bootstrap Django test runner:
# taken from django-extensions (which also has
# a comment suggesting it was taken originally from
# from http://www.travisswicegood.com/2010/01/17/
# django-virtualenv-pip-and-fabric/
import os
import sys
import django
from django.conf import settings
from django.core.management import call_command
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, PROJECT_ROOT)
def main():
settings.configure(
INSTALLED_APPS=[
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django_inlinecss'
],
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
STATIC_URL='/static/',
DEBUG=True
)
# Setup Django if 1.7 or greater
if django.get_version() >= '1.7':
django.setup()
call_command('test', 'django_inlinecss')
if __name__ == '__main__':
main()