-
Notifications
You must be signed in to change notification settings - Fork 0
/
runtests.py
34 lines (27 loc) · 1.11 KB
/
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
# -*- coding: utf-8 -*-
import os, sys
from django.conf import settings
from django.core.management import call_command
DIRNAME = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(DIRNAME, 'database.db'),
}
}
settings.configure(DEBUG = True,
DATABASES=DATABASES,
USE_TZ=True,
CROCDOC_API_KEY='12345678910111213141516171819201234567891011121314151617181920',
ROOT_URLCONF='dj_crocodoc.urls',
INSTALLED_APPS = ('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'dj_crocodoc',
'dj_crocodoc.tests',))
from django.test.simple import DjangoTestSuiteRunner
call_command('syncdb', interactive=False)
failures = DjangoTestSuiteRunner().run_tests(['dj_crocodoc',], verbosity=1)
if failures:
sys.exit(failures)