Skip to content

Commit

Permalink
Fix for extension tests I broke, refs #782
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Dec 31, 2022
1 parent ca07fff commit a2dca62
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_load_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ async def test_load_extension_default_entrypoint():
# should fail.
ds = Datasette(sqlite_extensions=[COMPILED_EXTENSION_PATH])

response = await ds.client.get("/_memory.json?sql=select+a()")
response = await ds.client.get("/_memory.json?_shape=arrays&sql=select+a()")
assert response.status_code == 200
assert response.json()["rows"][0][0] == "a"

response = await ds.client.get("/_memory.json?sql=select+b()")
response = await ds.client.get("/_memory.json?_shape=arrays&sql=select+b()")
assert response.status_code == 400
assert response.json()["error"] == "no such function: b"

response = await ds.client.get("/_memory.json?sql=select+c()")
response = await ds.client.get("/_memory.json?_shape=arrays&sql=select+c()")
assert response.status_code == 400
assert response.json()["error"] == "no such function: c"

Expand All @@ -52,14 +52,14 @@ async def test_load_extension_multiple_entrypoints():
]
)

response = await ds.client.get("/_memory.json?sql=select+a()")
response = await ds.client.get("/_memory.json?_shape=arrays&sql=select+a()")
assert response.status_code == 200
assert response.json()["rows"][0][0] == "a"

response = await ds.client.get("/_memory.json?sql=select+b()")
response = await ds.client.get("/_memory.json?_shape=arrays&sql=select+b()")
assert response.status_code == 200
assert response.json()["rows"][0][0] == "b"

response = await ds.client.get("/_memory.json?sql=select+c()")
response = await ds.client.get("/_memory.json?_shape=arrays&sql=select+c()")
assert response.status_code == 200
assert response.json()["rows"][0][0] == "c"

0 comments on commit a2dca62

Please sign in to comment.