Rename ?_nofacets=1 to ?_nofacet=1, refs #1353

This commit is contained in:
Simon Willison 2021-06-01 08:55:28 -07:00
commit 8bde6c5461
5 changed files with 13 additions and 13 deletions

View file

@ -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: