From d936ba4c31070d8d934f1e083671d927ef19be32 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sat, 16 Dec 2017 23:17:34 +0900 Subject: [PATCH] Suppress unnecessary logging output in UTs Change-Id: I2e36cc3401f406535dce24f0759a2ba402ca71f6 --- openstack_auth/tests/settings.py | 21 +++++++++++++++++++++ openstack_dashboard/test/settings.py | 8 ++++++++ 2 files changed, 29 insertions(+) diff --git a/openstack_auth/tests/settings.py b/openstack_auth/tests/settings.py index 4b1a43d2b4..41c9041944 100644 --- a/openstack_auth/tests/settings.py +++ b/openstack_auth/tests/settings.py @@ -73,6 +73,27 @@ TEMPLATES = [ }, ] +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'null': { + 'level': 'DEBUG', + 'class': 'logging.NullHandler', + }, + 'test': { + 'level': 'ERROR', + 'class': 'logging.StreamHandler', + } + }, + 'loggers': { + 'openstack_auth': { + 'handlers': ['test'], + 'propagate': False, + }, + } +} + AUTH_USER_MODEL = 'openstack_auth.User' LOGGING = { diff --git a/openstack_dashboard/test/settings.py b/openstack_dashboard/test/settings.py index ad5df5240d..4a0bf3c57b 100644 --- a/openstack_dashboard/test/settings.py +++ b/openstack_dashboard/test/settings.py @@ -224,6 +224,14 @@ LOGGING['loggers'].update( 'handlers': ['test'], 'propagate': False, }, + 'oslo_policy': { + 'handlers': ['test'], + 'propagate': False, + }, + 'stevedore': { + 'handlers': ['test'], + 'propagate': False, + }, 'iso8601': { 'handlers': ['null'], 'propagate': False,