django-constance/tests/settings.py

53 lines
1.3 KiB
Python
Raw Normal View History

# -*- encoding: utf-8 -*-
2013-04-12 15:25:11 +00:00
import six
from datetime import datetime, date, time
2010-09-03 12:38:43 +00:00
from decimal import Decimal
2013-04-12 15:25:11 +00:00
TEST_RUNNER = 'discover_runner.DiscoverRunner'
SECRET_KEY = 'cheese'
DATABASE_ENGINE = 'sqlite3'
2010-08-25 12:55:01 +00:00
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
2010-08-25 12:55:01 +00:00
}
}
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
2010-11-12 14:06:59 +00:00
'django.contrib.sessions',
'django.contrib.messages',
2010-11-12 14:06:59 +00:00
2010-08-25 12:55:01 +00:00
'constance',
'constance.backends.database',
2010-08-25 12:55:01 +00:00
)
ROOT_URLCONF = 'tests.urls'
2010-11-12 14:06:59 +00:00
CONSTANCE_CONNECTION_CLASS = 'tests.redis_mockup.Connection'
2010-08-25 13:08:07 +00:00
2013-04-12 15:25:11 +00:00
long_value = 123456
if not six.PY3:
long_value = long(long_value)
2010-08-25 13:08:07 +00:00
CONSTANCE_CONFIG = {
'INT_VALUE': (1, 'some int'),
2013-04-12 15:25:11 +00:00
'LONG_VALUE': (long_value, 'some looong int'),
2010-08-25 13:08:07 +00:00
'BOOL_VALUE': (True, 'true or false'),
'STRING_VALUE': ('Hello world', 'greetings'),
2013-04-12 15:25:11 +00:00
'UNICODE_VALUE': (six.u('Rivière-Bonjour'), 'greetings'),
2010-09-03 12:38:43 +00:00
'DECIMAL_VALUE': (Decimal('0.1'), 'the first release version'),
'DATETIME_VALUE': (datetime(2010, 8, 23, 11, 29, 24), 'time of the first commit'),
'FLOAT_VALUE': (3.1415926536, 'PI'),
'DATE_VALUE': (date(2010, 12, 24), 'Merry Chrismas'),
'TIME_VALUE': (time(23, 59, 59), 'And happy New Year'),
2010-08-25 13:08:07 +00:00
}
DEBUG = True