Default JSON shape is now objects - refs #1914, #1709

This commit is contained in:
Simon Willison 2022-12-30 06:52:47 -08:00
commit 234230e595
6 changed files with 69 additions and 60 deletions

View file

@ -45,9 +45,9 @@ def test_plugin_hooks_have_tests(plugin_hook):
@pytest.mark.asyncio
async def test_hook_plugins_dir_plugin_prepare_connection(ds_client):
response = await ds_client.get(
"/fixtures.json?sql=select+convert_units(100%2C+'m'%2C+'ft')"
"/fixtures.json?_shape=arrayfirst&sql=select+convert_units(100%2C+'m'%2C+'ft')"
)
assert pytest.approx(328.0839) == response.json()["rows"][0][0]
assert response.json()[0] == pytest.approx(328.0839)
@pytest.mark.asyncio