From b01bba536a5f437890c48e8f88a6702c43ad5352 Mon Sep 17 00:00:00 2001 From: "Adriano (daitarn)" Date: Wed, 28 Oct 2026 21:41:22 +0100 Subject: [PATCH] Test check: la quota non prodotta entra come NaN/fail Refs #118 Co-Authored-By: Claude Sonnet 5.5 --- src/backend/tests/test_task_acquisition.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/tests/test_task_acquisition.py b/src/backend/tests/test_task_acquisition.py index 627ecf7..b739c76 100644 --- a/src/backend/tests/test_task_acquisition.py +++ b/src/backend/tests/test_task_acquisition.py @@ -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"}]