From ace63948bf025b549e56141913a57c8d3881c394 Mon Sep 17 00:00:00 2001 From: Josef Vacha <69599105+JosefVacha@users.noreply.github.com> Date: Sun, 24 May 2026 23:37:17 +0000 Subject: [PATCH 1/2] fix: Replace print() with logger in flask --- tests/test_testing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_testing.py b/tests/test_testing.py index c172f14d68..895ff03fbd 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -1,3 +1,5 @@ +import logging +logger = logging.getLogger(__name__) import importlib.metadata import click @@ -119,13 +121,13 @@ def test_blueprint_with_subdomain(): app.config["APPLICATION_ROOT"] = "/foo" client = app.test_client() - bp = flask.Blueprint("company", __name__, subdomain="xxx") + bp = flask.Bluelogger.info("company", __name__, subdomain="xxx") @bp.route("/") def index(): return flask.request.url - app.register_blueprint(bp) + app.register_bluelogger.info(bp) ctx = app.test_request_context("/", subdomain="xxx") assert ctx.request.url == "http://xxx.example.com:1234/foo/" From 4b472666284286b193606b957d6f3bc21d0e349c Mon Sep 17 00:00:00 2001 From: Josef Vacha <69599105+JosefVacha@users.noreply.github.com> Date: Sun, 24 May 2026 23:39:06 +0000 Subject: [PATCH 2/2] fix: Replace print() with logger in flask --- tests/test_apps/blueprintapp/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_apps/blueprintapp/__init__.py b/tests/test_apps/blueprintapp/__init__.py index ad594cf1da..389824fa9b 100644 --- a/tests/test_apps/blueprintapp/__init__.py +++ b/tests/test_apps/blueprintapp/__init__.py @@ -1,3 +1,5 @@ +import logging +logger = logging.getLogger(__name__) from flask import Flask app = Flask(__name__) @@ -5,5 +7,5 @@ from blueprintapp.apps.admin import admin # noqa: E402 from blueprintapp.apps.frontend import frontend # noqa: E402 -app.register_blueprint(admin) -app.register_blueprint(frontend) +app.register_bluelogger.info(admin) +app.register_bluelogger.info(frontend)