From f2d4c38a90e28eaf61683644e494000cb16b8df8 Mon Sep 17 00:00:00 2001 From: UnitOne AutoFix Date: Wed, 27 May 2026 19:58:00 +0530 Subject: [PATCH] fix(security): [B101] Use of assert detected. The enclosed code will ... Generated via Claude CLI Issue: a25d4d9515aa Severity: low Job: AFQ-aabeb3b0 --- tests/test_health.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_health.py b/tests/test_health.py index 5c5a580..536827a 100644 --- a/tests/test_health.py +++ b/tests/test_health.py @@ -5,12 +5,15 @@ def test_healthz_returns_ok(): app = create_app() client = app.test_client() resp = client.get("/healthz") - assert resp.status_code == 200 - assert resp.json["status"] == "ok" + if resp.status_code != 200: + raise AssertionError(f"Expected status code 200, got {resp.status_code}") + if resp.json["status"] != "ok": + raise AssertionError(f"Expected status 'ok', got {resp.json['status']}") def test_version_advertised(): app = create_app() client = app.test_client() resp = client.get("/healthz") - assert "version" in resp.json + if "version" not in resp.json: + raise AssertionError("Expected 'version' in response JSON") \ No newline at end of file