-
Notifications
You must be signed in to change notification settings - Fork 6
/
runtests.py
62 lines (52 loc) · 1.71 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python
import sys
from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
MIDDLEWARE_CLASSES=(
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware'
),
INSTALLED_APPS=(
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.redirects',
'opps.core',
'opps.channels',
'opps.boxes',
'opps.articles',
'opps.images',
'opps.sitemaps',
'opps.containers',
'opps.archives',
'opps.flatpages',
'opps.multimedias',
),
SITE_ID = 1,
ROOT_URLCONF = "opps.urls",
TEST_RUNNER = 'django_coverage.coverage_runner.CoverageRunner',
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.simple_backend.SimpleEngine'
}
}
)
def runtests():
argv = [sys.argv[0], 'test', 'multimedias']
execute_from_command_line(argv)
sys.exit(0)
if __name__ == '__main__':
runtests()