-
Notifications
You must be signed in to change notification settings - Fork 36
/
runtests.py
29 lines (24 loc) · 806 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
import sys
from os.path import abspath, dirname
from django.conf import settings
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
AUTHNET_DEBUG=False,
AUTHNET_LOGIN_ID="loginid",
AUTHNET_TRANSACTION_KEY="key",
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.auth',
'django.contrib.sessions',
'tests',
'authorizenet',
),
ROOT_URLCONF='tests.urls',
STATIC_URL='/static/',
DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}},
)
def runtests():
from django.test.simple import DjangoTestSuiteRunner
failures = DjangoTestSuiteRunner(failfast=False).run_tests(['tests'])
sys.exit(failures)