From 1167e27b1d5ee14efd0ccf0c3f62b330d0495473 Mon Sep 17 00:00:00 2001 From: Julian Cuni Date: Thu, 8 Oct 2026 16:15:27 +0200 Subject: [PATCH] fix(vision): wrap the health-filter test lines (ruff E501 broke the image build) --- apps/vision/tests/test_app.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/vision/tests/test_app.py b/apps/vision/tests/test_app.py index 6cc69df..17f8ef0 100644 --- a/apps/vision/tests/test_app.py +++ b/apps/vision/tests/test_app.py @@ -60,8 +60,13 @@ def test_health_access_log_lines_are_dropped() -> None: access = logging.getLogger("uvicorn.access") # uvicorn's access record: '%s - "%s %s HTTP/%s" %d' with (client, method, path, version, status) fmt = '%s - "%s %s HTTP/%s" %d' - health = access.makeRecord("uvicorn.access", logging.INFO, __file__, 0, fmt, ("127.0.0.1:1", "GET", "/health", "1.1", 200), None) - analyze = access.makeRecord("uvicorn.access", logging.INFO, __file__, 0, fmt, ("127.0.0.1:1", "POST", "/analyze", "1.1", 200), None) + + def record(method: str, path: str) -> logging.LogRecord: + args = ("127.0.0.1:1", method, path, "1.1", 200) + return access.makeRecord("uvicorn.access", logging.INFO, __file__, 0, fmt, args, None) + + health = record("GET", "/health") + analyze = record("POST", "/analyze") assert flt.filter(health) is False assert flt.filter(analyze) is True # The filter is installed on the live logger at import.