2015-06-08 19:36:49 +00:00
|
|
|
import os
|
2015-06-08 16:01:09 +00:00
|
|
|
from datetime import timedelta
|
|
|
|
|
2015-06-08 19:36:49 +00:00
|
|
|
DEBUG = False
|
|
|
|
|
2015-06-08 16:01:09 +00:00
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
|
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
|
|
'NAME': ':memory:',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
|
|
|
|
MIDDLEWARE_CLASSES = (
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-06-08 19:36:49 +00:00
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': False,
|
|
|
|
|
|
|
|
'formatters': {
|
|
|
|
'simple': {
|
|
|
|
'format': '%(asctime)s %(process)d [%(levelname)s] %(name)s Line: %(lineno)s id: %(process)d : %(message)s'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'filters': {
|
|
|
|
'require_debug_false': {
|
|
|
|
'()': 'django.utils.log.RequireDebugFalse',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'handlers': {
|
|
|
|
'console': {
|
|
|
|
'class': 'logging.StreamHandler',
|
|
|
|
'filters': ['require_debug_false'],
|
|
|
|
'formatter': 'simple',
|
|
|
|
},
|
|
|
|
'mail_admins': {
|
|
|
|
'level': 'ERROR',
|
|
|
|
'filters': ['require_debug_false'],
|
|
|
|
'class': 'django.utils.log.AdminEmailHandler',
|
|
|
|
'formatter': 'simple',
|
|
|
|
},
|
|
|
|
"debug_file_handler": {
|
|
|
|
"class": "logging.handlers.RotatingFileHandler",
|
|
|
|
"level": "DEBUG",
|
|
|
|
"formatter": "simple",
|
|
|
|
'filename': 'debug.log',
|
|
|
|
'formatter': 'simple',
|
|
|
|
"maxBytes": 10485760,
|
|
|
|
"backupCount": 20,
|
|
|
|
"encoding": "utf8"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'loggers': {
|
|
|
|
'oidc_provider': {
|
|
|
|
'handlers': ['console', 'debug_file_handler'],
|
|
|
|
'level': os.getenv('DJANGO_LOG_LEVEL', 'DEBUG'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2015-06-08 16:01:09 +00:00
|
|
|
INSTALLED_APPS = (
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.sites',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.admin',
|
|
|
|
|
|
|
|
'oidc_provider',
|
|
|
|
)
|
|
|
|
|
2015-06-08 19:36:49 +00:00
|
|
|
SECRET_KEY = 'secret-for-test-secret-top-secret'
|
2015-06-08 16:01:09 +00:00
|
|
|
|
|
|
|
ROOT_URLCONF = 'oidc_provider.tests.test_urls'
|
|
|
|
|
|
|
|
TEMPLATE_DIRS = (
|
|
|
|
"oidc_provider/tests/templates",
|
|
|
|
)
|
|
|
|
|
|
|
|
# OIDC Provider settings.
|
|
|
|
|
|
|
|
SITE_URL = 'http://localhost:8000'
|