@@ -101,6 +101,25 @@ def test_conformance(app):
101
101
assert "Conformance" in response .text
102
102
103
103
104
+ @pytest .mark .vcr
105
+ def test_rasterio_tilejson (app , rasterio_query_params ):
106
+ """Test /tilejson.json endpoint for rasterio backend"""
107
+
108
+ response = app .get (
109
+ "/WebMercatorQuad/tilejson.json" ,
110
+ params = {
111
+ ** rasterio_query_params ,
112
+ "datetime" : "2024-10-11T00:00:00Z/2024-10-12T23:59:59Z" ,
113
+ },
114
+ )
115
+
116
+ assert response .status_code == 200
117
+ assert response .headers ["content-type" ] == "application/json"
118
+
119
+ tilejson = response .json ()
120
+ assert tilejson ["bounds" ] == [- 180.0 , - 90.0 , 180.0 , 90.0 ]
121
+
122
+
104
123
@pytest .mark .vcr
105
124
def test_rasterio_statistics (app , mock_cmr_get_assets , mn_geojson ):
106
125
"""Test /statistics endpoint for a polygon that straddles the boundary between two HLS granules"""
@@ -182,6 +201,25 @@ def test_rasterio_part(
182
201
assert response .headers ["content-type" ] == "image/tiff; application=geotiff"
183
202
184
203
204
+ @pytest .mark .vcr
205
+ def test_xarray_tilejson (app , xarray_query_params ):
206
+ """Test /tilejson.json endpoint for xarray backend"""
207
+
208
+ response = app .get (
209
+ "/WebMercatorQuad/tilejson.json" ,
210
+ params = {
211
+ ** xarray_query_params ,
212
+ "datetime" : "2024-10-11T00:00:00Z/2024-10-12T23:59:59Z" ,
213
+ },
214
+ )
215
+
216
+ assert response .status_code == 200
217
+ assert response .headers ["content-type" ] == "application/json"
218
+
219
+ tilejson = response .json ()
220
+ assert tilejson ["bounds" ] == [- 180.0 , - 90.0 , 180.0 , 90.0 ]
221
+
222
+
185
223
@pytest .mark .vcr
186
224
def test_xarray_statistics (
187
225
app , mock_cmr_get_assets , xarray_query_params , arctic_geojson
0 commit comments