mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Rename ?_nofacets=1 to ?_nofacet=1, refs #1353
This commit is contained in:
parent
d1d06ace49
commit
8bde6c5461
5 changed files with 13 additions and 13 deletions
|
|
@ -1669,13 +1669,13 @@ def test_suggest_facets_off():
|
|||
assert [] == client.get("/fixtures/facetable.json").json["suggested_facets"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("nofacets", (True, False))
|
||||
def test_nofacets(app_client, nofacets):
|
||||
@pytest.mark.parametrize("nofacet", (True, False))
|
||||
def test_nofacet(app_client, nofacet):
|
||||
path = "/fixtures/facetable.json?_facet=state"
|
||||
if nofacets:
|
||||
path += "&_nofacets=1"
|
||||
if nofacet:
|
||||
path += "&_nofacet=1"
|
||||
response = app_client.get(path)
|
||||
if nofacets:
|
||||
if nofacet:
|
||||
assert response.json["suggested_facets"] == []
|
||||
assert response.json["facet_results"] == {}
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ def test_custom_sql_csv_blob_columns(app_client):
|
|||
assert "text/plain; charset=utf-8" == response.headers["content-type"]
|
||||
assert response.text == (
|
||||
"rowid,data\r\n"
|
||||
'1,"http://localhost/fixtures.blob?sql=select+rowid,+data+from+binary_data&_nofacets=1&_blob_column=data&_blob_hash=f3088978da8f9aea479ffc7f631370b968d2e855eeb172bea7f6c7a04262bb6d"\r\n'
|
||||
'2,"http://localhost/fixtures.blob?sql=select+rowid,+data+from+binary_data&_nofacets=1&_blob_column=data&_blob_hash=b835b0483cedb86130b9a2c280880bf5fadc5318ddf8c18d0df5204d40df1724"\r\n'
|
||||
'1,"http://localhost/fixtures.blob?sql=select+rowid,+data+from+binary_data&_nofacet=1&_blob_column=data&_blob_hash=f3088978da8f9aea479ffc7f631370b968d2e855eeb172bea7f6c7a04262bb6d"\r\n'
|
||||
'2,"http://localhost/fixtures.blob?sql=select+rowid,+data+from+binary_data&_nofacet=1&_blob_column=data&_blob_hash=b835b0483cedb86130b9a2c280880bf5fadc5318ddf8c18d0df5204d40df1724"\r\n'
|
||||
"3,\r\n"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue