diff --git a/tests/test_collections.py b/tests/test_collections.py index 7da0db9..0e012fa 100644 --- a/tests/test_collections.py +++ b/tests/test_collections.py @@ -559,7 +559,12 @@ def test_collections_additional_parameters(app): assert response.status_code == 200 resp = response.json() assert resp["search"]["search"]["bbox"] == [-87.0251, 36.1749, -86.9999, 36.2001] - assert resp["search"]["metadata"]["bbox"] == [-87.0251, 36.1749, -86.9999, 36.2001] + assert resp["search"]["metadata"]["bounds"] == [ + -87.0251, + 36.1749, + -86.9999, + 36.2001, + ] # ids response = app.get( @@ -577,7 +582,7 @@ def test_collections_additional_parameters(app): assert response.status_code == 200 resp = response.json() assert len(resp) == 1 - assert resp[0]["id"] == "20200307aC0853000w361030" + assert resp[0]["id"] == "20200307aC0853130w361030" # datetime response = app.get( @@ -587,8 +592,6 @@ def test_collections_additional_parameters(app): assert response.status_code == 200 resp = response.json() assert resp["search"]["search"]["datetime"] == "2020-03-07T00:00:00Z" - assert "datetime <= '2020-03-07 00:00:00+00'" in resp["search"]["_where"] - assert "end_datetime >= '2020-03-07 00:00:00+00''" in resp["search"]["_where"] response = app.get( "/collections/noaa-emergency-response/info", @@ -597,4 +600,3 @@ def test_collections_additional_parameters(app): assert response.status_code == 200 resp = response.json() assert resp["search"]["search"]["datetime"] == "../2020-03-07T00:00:00Z" - assert "end_datetime >= '-infinity'" in resp["search"]["_where"] diff --git a/tests/test_searches.py b/tests/test_searches.py index 723942a..72a44f7 100644 --- a/tests/test_searches.py +++ b/tests/test_searches.py @@ -750,21 +750,21 @@ def test_mosaic_list(app): resp = response.json() assert ["searches", "links", "context"] == list(resp) assert len(resp["searches"]) > 0 - assert len(resp["links"]) == 1 + assert len(resp["links"]) >= 1 response = app.get("/searches/list?limit=1") assert response.status_code == 200 resp = response.json() assert ["searches", "links", "context"] == list(resp) assert len(resp["searches"]) == 1 - assert len(resp["links"]) == 2 + assert len(resp["links"]) >= 2 response = app.get("/searches/list?limit=1&offset=1") assert response.status_code == 200 resp = response.json() assert ["searches", "links", "context"] == list(resp) assert len(resp["searches"]) == 1 - assert len(resp["links"]) == 3 + assert len(resp["links"]) >= 3 query = { "filter": { diff --git a/titiler/pgstac/dependencies.py b/titiler/pgstac/dependencies.py index 25d3db5..932c0cf 100644 --- a/titiler/pgstac/dependencies.py +++ b/titiler/pgstac/dependencies.py @@ -43,7 +43,7 @@ def SearchIdParams( collection_id, str(ids), str(bbox), - str(datetime), + datetime, ), ) @retry(