From ad4e2cd4c1ad9ce4fa9f09e24f6eb90fba8a2e6f Mon Sep 17 00:00:00 2001 From: UnitOne AutoFix Date: Wed, 27 May 2026 19:58:19 +0530 Subject: [PATCH] fix(security): [B101] Use of assert detected. The enclosed code will ... Generated via Claude CLI Issue: 41da6684a26f Severity: low Job: AFQ-5ec742a9 --- 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..ca5b302 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' key in response JSON") \ No newline at end of file