mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fix broken CSV/JSON export on query page, refs #1010
This commit is contained in:
parent
c13d184704
commit
9f6dd985bc
2 changed files with 8 additions and 1 deletions
|
|
@ -672,6 +672,13 @@ def test_row_json_export_link(app_client):
|
|||
assert '<a href="/fixtures/simple_primary_key/1.json">json</a>' in response.text
|
||||
|
||||
|
||||
def test_query_json_csv_export_links(app_client):
|
||||
response = app_client.get("/fixtures?sql=select+1")
|
||||
assert response.status == 200
|
||||
assert '<a href="/fixtures.json?sql=select+1">json</a>' in response.text
|
||||
assert '<a href="/fixtures.csv?sql=select+1&_size=max">CSV</a>' in response.text
|
||||
|
||||
|
||||
def test_csv_json_export_links_include_labels_if_foreign_keys(app_client):
|
||||
response = app_client.get("/fixtures/facetable")
|
||||
assert response.status == 200
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue