diff --git a/studio/backend/tests/test_log_noise_filters.py b/studio/backend/tests/test_log_noise_filters.py index 4203c5b32e..52b956f256 100644 --- a/studio/backend/tests/test_log_noise_filters.py +++ b/studio/backend/tests/test_log_noise_filters.py @@ -88,15 +88,19 @@ def _status_app(status): async def app(scope, receive, send): await send({"type": "http.response.start", "status": status, "headers": []}) await send({"type": "http.response.body", "body": b""}) + return app # ── status/progress poll: quiet on success, logged on error ──────────── + def test_success_poll_200_suppressed(logs): # The high-frequency /api/export/status poll (838x in a real run) is silenced. for _ in range(5): - _run(LoggingMiddleware(_status_app(200))(_scope("/api/export/status"), _noop_receive, _send)) + _run( + LoggingMiddleware(_status_app(200))(_scope("/api/export/status"), _noop_receive, _send) + ) assert logs.events == [] @@ -108,7 +112,11 @@ def test_success_poll_error_is_still_logged(logs): def test_load_progress_poll_suppressed(logs): - _run(LoggingMiddleware(_status_app(200))(_scope("/api/inference/load-progress"), _noop_receive, _send)) + _run( + LoggingMiddleware(_status_app(200))( + _scope("/api/inference/load-progress"), _noop_receive, _send + ) + ) assert logs.events == []