Skip to content
Snippets Groups Projects
Commit 50176e70 authored by Lars Kruse's avatar Lars Kruse
Browse files

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.
parent a1f713e5
No related branches found
No related tags found
1 merge request!1Style & Tests
...@@ -9,7 +9,9 @@ from src.rest.encoder import JSONEncoder ...@@ -9,7 +9,9 @@ from src.rest.encoder import JSONEncoder
class BaseTestCase(TestCase): class BaseTestCase(TestCase):
def create_app(self): 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 = connexion.App(__name__, specification_dir='../swagger/')
app.app.json_encoder = JSONEncoder app.app.json_encoder = JSONEncoder
app.add_api('swagger.yaml') app.add_api('swagger.yaml')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment