From df1fbbe6bc1c4a7fa590a370e65c8ed55a1a3b7a Mon Sep 17 00:00:00 2001 From: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com> Date: Wed, 25 Nov 2026 01:31:53 +0000 Subject: [PATCH] test(notebook): simplify the non-finite verdict PATCH body Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com> --- tests/api/test_practice.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/api/test_practice.py b/tests/api/test_practice.py index afa48b044..751b4c1d7 100644 --- a/tests/api/test_practice.py +++ b/tests/api/test_practice.py @@ -651,14 +651,11 @@ def test_entry_patch_rejects_non_finite_verdict_numbers(bank): store, _, client = bank entry = seed(store) # ``json.loads`` accepts these literals; stored, they would break every read. + body = '{"ai_verdict": {"result": "correct", "final": true, "awarded_points": N}}' for literal in ("Infinity", "NaN", "1e999"): - body = ( - '{"ai_verdict": {"result": "correct", "final": true, ' - f'"awarded_points": {literal}}}}}' - ) response = client.patch( f"/bank/entries/{entry['id']}", - content=body, + content=body.replace("N", literal), headers={"content-type": "application/json"}, ) assert response.status_code == 422