debian-django-admin-rangefi.../runtests.py

57 lines
1.5 KiB
Python
Raw Permalink Normal View History

2016-06-24 12:17:49 +02:00
#!/usr/bin/env python
from __future__ import unicode_literals
import django
2018-03-17 15:18:57 +01:00
from django.conf import settings
2016-06-24 12:17:49 +02:00
from django.core.management import call_command
settings.configure(
INSTALLED_APPS=(
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.sessions',
2019-04-05 13:16:13 +02:00
'django.contrib.messages',
2016-06-24 12:17:49 +02:00
'rangefilter',
),
DATABASES={
'default': {'ENGINE': 'django.db.backends.sqlite3'}
},
TEST_RUNNER='django.test.runner.DiscoverRunner',
2018-01-23 15:50:04 +01:00
USE_TZ=True,
TIME_ZONE='UTC',
2019-04-05 13:16:13 +02:00
SITE_ID=1,
STATIC_URL='/static/',
2019-04-05 13:16:13 +02:00
TEMPLATES=[
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
'OPTIONS': {
'debug': True,
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
}
},
],
MIDDLEWARE=(
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
),
PASSWORD_HASHERS=(
'django.contrib.auth.hashers.MD5PasswordHasher',
),
2016-06-24 12:17:49 +02:00
)
2017-04-12 22:04:24 +02:00
django.setup()
2016-06-24 12:17:49 +02:00
if __name__ == '__main__':
call_command('test', 'rangefilter')