@@ -2891,12 +2891,11 @@ def test_load_stac_from_job_empty_result(self, con120, requests_mock):
2891
2891
2892
2892
@pytest .mark .parametrize ("temporal_dim" , ["t" , "datezz" ])
2893
2893
def test_load_stac_reduce_temporal (self , con120 , tmp_path , temporal_dim ):
2894
- # TODO: reusable utility to create/generate a STAC resource for testing
2895
- # (a file, but preferably a URL, but that requires urllib mocking)
2896
2894
stac_path = tmp_path / "stac.json"
2897
2895
stac_data = StacDummyBuilder .collection (
2898
2896
cube_dimensions = {temporal_dim : {"type" : "temporal" , "extent" : ["2024-01-01" , "2024-04-04" ]}}
2899
2897
)
2898
+ # TODO #738 real request mocking of STAC resources compatible with pystac?
2900
2899
stac_path .write_text (json .dumps (stac_data ))
2901
2900
2902
2901
cube = con120 .load_stac (str (stac_path ))
@@ -2952,6 +2951,7 @@ def test_load_stac_no_cube_extension_temporal_dimension(self, con120, tmp_path,
2952
2951
# No cube:dimensions, but at least "temporal" extent is set as indicator for having a temporal dimension
2953
2952
assert "cube:dimensions" not in stac_data
2954
2953
assert deep_get (stac_data , "extent" , "temporal" )
2954
+ # TODO #738 real request mocking of STAC resources compatible with pystac?
2955
2955
stac_path .write_text (json .dumps (stac_data ))
2956
2956
2957
2957
cube = con120 .load_stac (str (stac_path ))
@@ -2962,6 +2962,7 @@ def test_load_stac_band_filtering(self, con120, tmp_path):
2962
2962
stac_data = StacDummyBuilder .collection (
2963
2963
summaries = {"eo:bands" : [{"name" : "B01" }, {"name" : "B02" }, {"name" : "B03" }]}
2964
2964
)
2965
+ # TODO #738 real request mocking of STAC resources compatible with pystac?
2965
2966
stac_path .write_text (json .dumps (stac_data ))
2966
2967
2967
2968
cube = con120 .load_stac (str (stac_path ))
0 commit comments