From 48e40e79baad4730f3a6cc9038e1b1637453c90c Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 11 Jan 2023 16:39:58 -0300 Subject: [PATCH] Modif log en mode TEST --- app/__init__.py | 4 +--- config.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index 6946415f5..6fb6cf052 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -502,12 +502,10 @@ def clear_scodoc_cache(): # --------- Logging -def log(msg: str, silent_test=True): +def log(msg: str): """log a message. If Flask app, use configured logger, else stderr. """ - if silent_test and current_app and current_app.config["TESTING"]: - return try: dept = getattr(g, "scodoc_dept", "") msg = f" ({dept}) {msg}" diff --git a/config.py b/config.py index 57c0fb1fd..740860a61 100755 --- a/config.py +++ b/config.py @@ -72,7 +72,7 @@ class DevConfig(Config): class TestConfig(DevConfig): "Pour les tests unitaires" TESTING = True - DEBUG = True + DEBUG = False SQLALCHEMY_DATABASE_URI = ( os.environ.get("SCODOC_TEST_DATABASE_URI") or "postgresql:///SCODOC_TEST" )