Skip to content

Commit 5467578

Browse files
authored
Add failing tests
1 parent 202b8a2 commit 5467578

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/resources/test_collection.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,3 +642,24 @@ async def test_get_collections_search_offset_1(
642642
prev_link = list(filter(lambda link: link["rel"] == "previous", links))[0]
643643
# offset=0 should not be in the previous link (because it's useless)
644644
assert "offset" not in prev_link["href"]
645+
646+
@pytest.mark.parametrize(
647+
"filter",
648+
[
649+
"true",
650+
"1=1",
651+
"false",
652+
"1=0",
653+
],
654+
)
655+
async def test_get_collections_filter(
656+
app_client, load_test_collection, load_test2_collection, filter
657+
):
658+
"""
659+
Test CQL2 filters on the collections endpoint
660+
"""
661+
resp = await app_client.get(
662+
"/collections",
663+
params={"filter": filter},
664+
)
665+
assert resp.status_code == 200

0 commit comments

Comments
 (0)