stac-fastapi.api 5.0.0__tar.gz → 5.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/PKG-INFO +1 -1
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/version.py +1 -1
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi.api.egg-info/PKG-INFO +1 -1
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/tests/test_app.py +39 -1
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/README.md +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/setup.cfg +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/setup.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/__init__.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/app.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/config.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/errors.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/middleware.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/models.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/openapi.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi/api/routes.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi.api.egg-info/SOURCES.txt +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi.api.egg-info/dependency_links.txt +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi.api.egg-info/not-zip-safe +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi.api.egg-info/requires.txt +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi.api.egg-info/top_level.txt +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/tests/test_api.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/tests/test_app_prefix.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/tests/test_middleware.py +0 -0
- {stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/tests/test_models.py +0 -0
|
@@ -15,7 +15,11 @@ from stac_fastapi.api.models import (
|
|
|
15
15
|
create_get_request_model,
|
|
16
16
|
create_post_request_model,
|
|
17
17
|
)
|
|
18
|
-
from stac_fastapi.extensions.core import
|
|
18
|
+
from stac_fastapi.extensions.core import (
|
|
19
|
+
FieldsExtension,
|
|
20
|
+
FilterExtension,
|
|
21
|
+
SearchFilterExtension,
|
|
22
|
+
)
|
|
19
23
|
from stac_fastapi.types import stac
|
|
20
24
|
from stac_fastapi.types.config import ApiSettings
|
|
21
25
|
from stac_fastapi.types.core import BaseCoreClient, NumType
|
|
@@ -184,6 +188,40 @@ def test_filter_extension(validate, TestCoreClient, item_dict):
|
|
|
184
188
|
)
|
|
185
189
|
|
|
186
190
|
assert landing.status_code == 200, landing.text
|
|
191
|
+
assert "Queryables" in [link.get("title") for link in landing.json()["links"]]
|
|
192
|
+
assert get_search.status_code == 200, get_search.text
|
|
193
|
+
assert post_search.status_code == 200, post_search.text
|
|
194
|
+
|
|
195
|
+
test_app = app.StacApi(
|
|
196
|
+
settings=ApiSettings(enable_response_models=validate),
|
|
197
|
+
client=FilterClient(),
|
|
198
|
+
search_get_request_model=create_get_request_model([SearchFilterExtension()]),
|
|
199
|
+
search_post_request_model=create_post_request_model([SearchFilterExtension()]),
|
|
200
|
+
extensions=[SearchFilterExtension()],
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
with TestClient(test_app.app) as client:
|
|
204
|
+
landing = client.get("/")
|
|
205
|
+
get_search = client.get(
|
|
206
|
+
"/search",
|
|
207
|
+
params={
|
|
208
|
+
"filter": "TEST",
|
|
209
|
+
"filter-crs": "EPSG:4326",
|
|
210
|
+
"filter-lang": "cql2-text",
|
|
211
|
+
},
|
|
212
|
+
)
|
|
213
|
+
post_search = client.post(
|
|
214
|
+
"/search",
|
|
215
|
+
json={
|
|
216
|
+
"collections": ["test"],
|
|
217
|
+
"filter": {},
|
|
218
|
+
"filter-crs": "EPSG:4326",
|
|
219
|
+
"filter-lang": "cql2-json",
|
|
220
|
+
},
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
assert landing.status_code == 200, landing.text
|
|
224
|
+
assert "Queryables" in [link.get("title") for link in landing.json()["links"]]
|
|
187
225
|
assert get_search.status_code == 200, get_search.text
|
|
188
226
|
assert post_search.status_code == 200, post_search.text
|
|
189
227
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stac_fastapi_api-5.0.0 → stac_fastapi_api-5.0.1}/stac_fastapi.api.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|