mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Update facet tests
This commit is contained in:
parent
298a899e79
commit
217c2969cf
3 changed files with 36 additions and 36 deletions
|
|
@ -115,13 +115,6 @@ async def test_column_facet_results(app_client):
|
|||
"toggle_url": "http://localhost/?_facet=city_id&city_id=1",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 2,
|
||||
"label": "Los Angeles",
|
||||
"count": 4,
|
||||
"toggle_url": "http://localhost/?_facet=city_id&city_id=2",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 3,
|
||||
"label": "Detroit",
|
||||
|
|
@ -129,6 +122,13 @@ async def test_column_facet_results(app_client):
|
|||
"toggle_url": "http://localhost/?_facet=city_id&city_id=3",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 2,
|
||||
"label": "Los Angeles",
|
||||
"count": 4,
|
||||
"toggle_url": "http://localhost/?_facet=city_id&city_id=2",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 4,
|
||||
"label": "Memnonia",
|
||||
|
|
@ -168,13 +168,6 @@ async def test_column_facet_from_metadata_cannot_be_hidden(app_client):
|
|||
"toggle_url": "http://localhost/?city_id=1",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 2,
|
||||
"label": "Los Angeles",
|
||||
"count": 4,
|
||||
"toggle_url": "http://localhost/?city_id=2",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 3,
|
||||
"label": "Detroit",
|
||||
|
|
@ -182,6 +175,13 @@ async def test_column_facet_from_metadata_cannot_be_hidden(app_client):
|
|||
"toggle_url": "http://localhost/?city_id=3",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 2,
|
||||
"label": "Los Angeles",
|
||||
"count": 4,
|
||||
"toggle_url": "http://localhost/?city_id=2",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": 4,
|
||||
"label": "Memnonia",
|
||||
|
|
@ -253,13 +253,6 @@ async def test_array_facet_results(app_client):
|
|||
"toggle_url": "http://localhost/?_facet_array=tags&tags__arraycontains=tag1",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": "tag2",
|
||||
"label": "tag2",
|
||||
"count": 1,
|
||||
"toggle_url": "http://localhost/?_facet_array=tags&tags__arraycontains=tag2",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": "tag3",
|
||||
"label": "tag3",
|
||||
|
|
@ -267,6 +260,13 @@ async def test_array_facet_results(app_client):
|
|||
"toggle_url": "http://localhost/?_facet_array=tags&tags__arraycontains=tag3",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": "tag2",
|
||||
"label": "tag2",
|
||||
"count": 1,
|
||||
"toggle_url": "http://localhost/?_facet_array=tags&tags__arraycontains=tag2",
|
||||
"selected": False,
|
||||
},
|
||||
],
|
||||
"hideable": True,
|
||||
"toggle_url": "/",
|
||||
|
|
@ -292,10 +292,10 @@ async def test_date_facet_results(app_client):
|
|||
"type": "date",
|
||||
"results": [
|
||||
{
|
||||
"value": "2019-01-14",
|
||||
"label": "2019-01-14",
|
||||
"value": "2019-01-17",
|
||||
"label": "2019-01-17",
|
||||
"count": 4,
|
||||
"toggle_url": "http://localhost/?_facet_date=created&created__date=2019-01-14",
|
||||
"toggle_url": "http://localhost/?_facet_date=created&created__date=2019-01-17",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
|
|
@ -306,10 +306,10 @@ async def test_date_facet_results(app_client):
|
|||
"selected": False,
|
||||
},
|
||||
{
|
||||
"value": "2019-01-17",
|
||||
"label": "2019-01-17",
|
||||
"value": "2019-01-14",
|
||||
"label": "2019-01-14",
|
||||
"count": 4,
|
||||
"toggle_url": "http://localhost/?_facet_date=created&created__date=2019-01-17",
|
||||
"toggle_url": "http://localhost/?_facet_date=created&created__date=2019-01-14",
|
||||
"selected": False,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue