Always pop as_format off args dict (#603)

Closes #563. Thanks, @chris48s
This commit is contained in:
chris48s 2019-10-21 03:03:08 +01:00 committed by Simon Willison
commit ca44cc03e3
2 changed files with 11 additions and 0 deletions

View file

@ -1107,6 +1107,15 @@ def test_row(app_client):
assert [{"id": "1", "content": "hello"}] == response.json["rows"]
def test_row_format_in_querystring(app_client):
# regression test for https://github.com/simonw/datasette/issues/563
response = app_client.get(
"/fixtures/simple_primary_key/1?_format=json&_shape=objects"
)
assert response.status == 200
assert [{"id": "1", "content": "hello"}] == response.json["rows"]
def test_row_strange_table_name(app_client):
response = app_client.get(
"/fixtures/table%2Fwith%2Fslashes.csv/3.json?_shape=objects"