mirror of
https://github.com/simonw/datasette.git
synced 2026-06-15 21:46:57 +02:00
Merge branch 'main' into queries
This commit is contained in:
commit
6033bf8e40
5 changed files with 50 additions and 24 deletions
|
|
@ -239,6 +239,22 @@ def test_query_page_truncates():
|
|||
]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_query_page_with_no_sql(ds_client):
|
||||
# https://github.com/simonw/datasette/issues/2743
|
||||
response = await ds_client.get("/fixtures/-/query")
|
||||
assert response.status_code == 200
|
||||
assert '<textarea id="sql-editor" name="sql"' in response.text
|
||||
assert 'class="rows-and-columns"' not in response.text
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_query_csv_with_no_sql_is_400(ds_client):
|
||||
# https://github.com/simonw/datasette/issues/2743
|
||||
response = await ds_client.get("/fixtures/-/query.csv")
|
||||
assert response.status_code == 400
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
"path,expected_classes",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue