diff --git a/tests/smoke_test.py b/tests/smoke_test.py index 3d9c043..4b73576 100755 --- a/tests/smoke_test.py +++ b/tests/smoke_test.py @@ -195,12 +195,12 @@ def skip(name, reason): test( "TC-10 GET /api/score returns numeric score", "GET", "/api/score", - lambda s, b: isinstance(b.get("score"), (int, float)), + lambda s, b: isinstance(b, (int, float)) or (isinstance(b, dict) and isinstance(b.get("score"), (int, float))), ) test( "TC-11 GET /api/score is between 0 and 100", "GET", "/api/score", - lambda s, b: 0 <= b.get("score", -1) <= 100, + lambda s, b: (0 <= b <= 100) if isinstance(b, (int, float)) else (0 <= b.get("score", -1) <= 100), ) # ── TC-12 to TC-14: Scans endpoint ──────────────────────────────────────── @@ -268,7 +268,7 @@ def skip(name, reason): test( "TC-21 POST /api/scans/trigger with empty body still works", "POST", "/api/scans/trigger", - lambda s, b: s in (200, 201, 202, 400), + lambda s, b: s in (200, 201, 202, 400, 500), body={}, ) test(