forked from postfalk/django-etl-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtests.py
34 lines (31 loc) · 956 Bytes
/
runtests.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
import os
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DEBUG=True,
DATABASES={
'default': {
'ENGINE': 'django.contrib.gis.db.backends.spatialite',
}
},
MEDIA_ROOT=os.path.dirname(
os.path.realpath(__file__))+'/tests',
ROOT_URLCONF='etl_sync.tests.urls',
INSTALLED_APPS=(
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'etl_sync',
'tests'
),
PROJECT_ROOT = os.path.join(
*os.path.realpath(__file__).split('/')[0:-2])
)
sys.path.insert(0, settings.PROJECT_ROOT)
from django.test.simple import DjangoTestSuiteRunner
testrunner = DjangoTestSuiteRunner(verbosity=1)
failures = testrunner.run_tests(['tests'])
if failures:
sys.exit(failures)