From 5c418efd7f18f9b469ccf14c1c8f86fd69d4427b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 6 Jul 2026 22:42:12 +0000 Subject: [PATCH] Update tests from main for canonical error shape and rows key Two tests merged from main were written against the pre-merge response shapes: the max_post_body_bytes 413 error now uses the canonical error envelope, and row update with return:true responds with a rows list rather than a singular row. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ --- tests/test_api_write.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_api_write.py b/tests/test_api_write.py index 7145a859..14dedb73 100644 --- a/tests/test_api_write.py +++ b/tests/test_api_write.py @@ -169,7 +169,10 @@ async def test_base64_write_api_insert_upsert_update_decode_blobs(ds_write): headers=_headers(token), ) assert update_response.status_code == 200 - assert update_response.json()["row"]["data"] == {"$base64": True, "encoded": "/wAB"} + assert update_response.json()["rows"][0]["data"] == { + "$base64": True, + "encoded": "/wAB", + } rows = (await db.execute(""" select @@ -344,10 +347,9 @@ async def test_insert_rows_post_body_too_large(tmp_path_factory): headers=_headers(token), ) assert response.status_code == 413 - assert response.json() == { - "ok": False, - "errors": ["Request body exceeded maximum size of 100 bytes"], - } + assert response.json() == error_body( + ["Request body exceeded maximum size of 100 bytes"], 413 + ) # A small body should still work response2 = await ds.client.post( "/data/docs/-/insert",