Commit 9e6c3c67 authored by Raphaël Hertzog's avatar Raphaël Hertzog

settings: disable logging during tests

parent cfab6fdd
......@@ -475,7 +475,7 @@ def compute_default_settings(target):
target['TEMPLATES'][0]['DIRS'].append(
target['DISTRO_TRACKER_TEMPLATE_DIRECTORY'])
# Update LOGGING with full paths
for handler in target['LOGGING']['handlers'].values():
for handler in target['LOGGING'].get('handlers', {}).values():
if 'filename' not in handler or "/" in handler['filename']:
continue
handler['filename'] = os.path.join(
......
......@@ -13,6 +13,22 @@ PASSWORD_HASHERS = [
'django.contrib.auth.hashers.SHA1PasswordHasher',
]
# Disable logging entirely
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'null': {
'class': 'logging.NullHandler',
},
},
'loggers': {
'distro_tracker': {
'handlers': ['null'],
}
}
}
# Restore INSTALLED_APPS and MIDDLEWARE from defaults to disable debug_toolbar
INSTALLED_APPS = defaults.INSTALLED_APPS.copy()
MIDDLEWARE = defaults.MIDDLEWARE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment