mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Introduce new /$DB/-/query endpoint, soft replaces /$DB?sql=... (#2363)
* Introduce new default /$DB/-/query endpoint * Fix a lot of tests * Update pyodide test to use query endpoint * Link to /fixtures/-/query in a few places * Documentation for QueryView --------- Co-authored-by: Simon Willison <swillison@gmail.com>
This commit is contained in:
parent
56adfff8d2
commit
a23c2aee00
21 changed files with 148 additions and 83 deletions
|
|
@ -1199,7 +1199,9 @@ async def test_format_of_binary_links(size, title, length_bytes):
|
|||
expected = "{}><Binary: {} bytes></a>".format(title, length_bytes)
|
||||
assert expected in response.text
|
||||
# And test with arbitrary SQL query too
|
||||
sql_response = await ds.client.get("/{}".format(db_name), params={"sql": sql})
|
||||
sql_response = await ds.client.get(
|
||||
"{}/-/query".format(db_name), params={"sql": sql}
|
||||
)
|
||||
assert sql_response.status_code == 200
|
||||
assert expected in sql_response.text
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue