Skip to content

Commit edbfc1f

Browse files
committed
added run_tests.py
1 parent 9224c86 commit edbfc1f

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

run_tests.py

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# from https://github.com/django-extensions/django-extensions/blob/master/run_tests.py
2+
3+
from django.conf import settings
4+
from django.core.management import call_command
5+
6+
def main():
7+
# Dynamically configure the Django settings with the minimum necessary to
8+
# get Django running tests
9+
settings.configure(
10+
INSTALLED_APPS=(
11+
'django.contrib.auth',
12+
'django.contrib.contenttypes',
13+
'django.contrib.admin',
14+
'django.contrib.sessions',
15+
'ajaxuploader',
16+
),
17+
# Django replaces this, but it still wants it. *shrugs*
18+
DATABASE_ENGINE = 'django.db.backends.sqlite3',
19+
DATABASES = {
20+
'default': {
21+
'ENGINE': 'django.db.backends.sqlite3',
22+
}
23+
},
24+
MEDIA_ROOT = '/tmp/ajaxuploader_test_media/',
25+
MEDIA_PATH = '/media/',
26+
ROOT_URLCONF = 'ajaxuploader.urls',
27+
DEBUG = True,
28+
TEMPLATE_DEBUG = True
29+
)
30+
31+
# Fire off the tests
32+
call_command('test', 'ajaxuploader')
33+
34+
35+
if __name__ == '__main__':
36+
main()

0 commit comments

Comments
 (0)