mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Brought back parameter fields, closes #2132
This commit is contained in:
parent
1377a290cd
commit
cd57b0f712
2 changed files with 33 additions and 2 deletions
|
|
@ -295,6 +295,22 @@ async def test_query_json_csv_export_links(ds_client):
|
|||
assert '<a href="/fixtures.csv?sql=select+1&_size=max">CSV</a>' in response.text
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_query_parameter_form_fields(ds_client):
|
||||
response = await ds_client.get("/fixtures?sql=select+:name")
|
||||
assert response.status_code == 200
|
||||
assert (
|
||||
'<label for="qp1">name</label> <input type="text" id="qp1" name="name" value="">'
|
||||
in response.text
|
||||
)
|
||||
response2 = await ds_client.get("/fixtures?sql=select+:name&name=hello")
|
||||
assert response2.status_code == 200
|
||||
assert (
|
||||
'<label for="qp1">name</label> <input type="text" id="qp1" name="name" value="hello">'
|
||||
in response2.text
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_row_html_simple_primary_key(ds_client):
|
||||
response = await ds_client.get("/fixtures/simple_primary_key/1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue