Skip to content

Commit 6095585

Browse files
committed
update changelog and add tests
1 parent a7344e9 commit 6095585

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
# Only run test and docker publish if some code have changed
1414
- 'pyproject.toml'
1515
- 'titiler/**'
16+
- 'tests/**'
1617
- '.pre-commit-config.yaml'
1718
- '.github/workflows/ci.yml'
1819
- 'uv.lock'

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
## [1.1.3] - 2026-03-05
6+
7+
* fix: better handling of custom TMS ids in WMTS endpoints
8+
* fix: CQL filter expression support in ItemSearch requests
9+
510
## [1.1.2] - 2026-02-12
611

712
* fix: render's parameter handling and query-parameter override

tests/test_collections.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Test titiler.stacapi Item endpoints."""
1+
"""Test titiler.stacapi collections endpoints."""
22

33
import json
44
import os
@@ -42,3 +42,39 @@ def test_stac_collections(rio, get_assets, app):
4242
assert resp["minzoom"] == 12
4343
assert resp["maxzoom"] == 14
4444
assert "?assets=cog" in resp["tiles"][0]
45+
46+
47+
@patch("titiler.stacapi.backend.ItemSearch")
48+
def test_stac_collections_filter(items_search, app):
49+
"""test arguments passed to ItemSearch."""
50+
51+
class ItemSearch:
52+
def __init__(self, *args, **kwargs):
53+
pass
54+
55+
def items_as_dicts(self):
56+
return [{}]
57+
58+
items_search.return_value = ItemSearch()
59+
_ = app.get(
60+
"/collections/noaa-emergency-response/tiles/WebMercatorQuad/0/0/0/assets",
61+
params={
62+
"filter": json.dumps({"op": "=", "args": [{"property": "value"}, "1"]}),
63+
"filter-lang": "cql2-json",
64+
},
65+
)
66+
assert items_search.call_args[1]["filter"] == {
67+
"op": "=",
68+
"args": [{"property": "value"}, "1"],
69+
}
70+
assert items_search.call_args[1]["filter_lang"] == "cql2-json"
71+
72+
_ = app.get(
73+
"/collections/noaa-emergency-response/tiles/WebMercatorQuad/0/0/0/assets",
74+
params={
75+
"filter": "(value = '1')",
76+
"filter-lang": "cql2-text",
77+
},
78+
)
79+
assert items_search.call_args[1]["filter"] == "(value = '1')"
80+
assert items_search.call_args[1]["filter_lang"] == "cql2-text"

0 commit comments

Comments
 (0)