From 50176e702c5a801c2b245922403c6bb858740b25 Mon Sep 17 00:00:00 2001 From: Lars Kruse <devel@sumpfralle.de> Date: Tue, 15 Mar 2022 04:49:44 +0100 Subject: [PATCH] test: reduce log noise The previous code intended to silence the most relevant source of log noise ("connexion.operations"), but due to the missing trailing "s", it failed to do so. Now all debug messages emitted during a test are silenced. --- src/rest/test/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rest/test/__init__.py b/src/rest/test/__init__.py index 85b82f6..5419f12 100644 --- a/src/rest/test/__init__.py +++ b/src/rest/test/__init__.py @@ -9,7 +9,9 @@ from src.rest.encoder import JSONEncoder class BaseTestCase(TestCase): def create_app(self): - logging.getLogger('connexion.operation').setLevel('ERROR') + # silence the noise debug log of the relevant modules + for log_name in ("connexion", "openapi_spec_validator"): + logging.getLogger(log_name).setLevel('ERROR') app = connexion.App(__name__, specification_dir='../swagger/') app.app.json_encoder = JSONEncoder app.add_api('swagger.yaml') -- GitLab