From bc888195ad6c1ad813770bd97df668ff178a801e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 3 May 2023 08:08:51 +0800 Subject: [PATCH] Disabled logging in the AuthenticationTestCase and FlaskLoginTestCase test cases, for clearer test output. --- tests/test_auth.py | 2 ++ tests/test_flask_login.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/test_auth.py b/tests/test_auth.py index b404c0b..5a0c208 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -18,6 +18,7 @@ """The test case for the HTTP digest authentication. """ +import logging from secrets import token_urlsafe from typing import Any, Optional, Dict @@ -55,6 +56,7 @@ class AuthenticationTestCase(TestCase): :return: The Flask application. """ + logging.getLogger("test_auth").addHandler(logging.NullHandler()) app: Flask = Flask(__name__) app.config.from_mapping({ "TESTING": True, diff --git a/tests/test_flask_login.py b/tests/test_flask_login.py index a2f7e39..e6fa7a4 100644 --- a/tests/test_flask_login.py +++ b/tests/test_flask_login.py @@ -18,6 +18,7 @@ """The test case for the Flask-Login integration. """ +import logging from secrets import token_urlsafe from typing import Optional, Dict @@ -75,6 +76,7 @@ class FlaskLoginTestCase(TestCase): :return: The Flask application. """ + logging.getLogger("test_flask_login").addHandler(logging.NullHandler()) app: Flask = Flask(__name__) app.config.from_mapping({ "TESTING": True,