Test check: la quota non prodotta entra come NaN/fail

Refs #118

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 21:41:22 +01:00
parent 17344aae13
commit b01bba536a
+5 -2
View File
@@ -244,7 +244,7 @@ async def test_check_calibration_reasons(
@pytest.mark.asyncio
async def test_check_omits_quotes_the_graph_did_not_produce(
async def test_check_lists_quotes_the_graph_did_not_produce_as_nan(
client, db_session, measurement_tec_user, monkeypatch,
):
_, task = await _camera_task(db_session, measurement_tec_user.id)
@@ -255,7 +255,10 @@ async def test_check_omits_quotes_the_graph_did_not_produce(
monkeypatch.setattr("src.backend.services.vision_service._call_worker", fake_call)
resp = await _check(client, measurement_tec_user, task)
assert resp.status_code == 200 # un'anteprima non da' 422 a ogni frame
assert resp.json()["measurements"] == []
# #118: la quota non prodotta c'e', value null (NaN) e fail
measurements = resp.json()["measurements"]
assert len(measurements) == 1
assert measurements[0]["value"] is None and measurements[0]["pass_fail"] == "fail"
assert resp.json()["failures"] == [{"tool_name": "blob"}]