@@ -2891,12 +2891,11 @@ def test_load_stac_from_job_empty_result(self, con120, requests_mock):
28912891
28922892 @pytest .mark .parametrize ("temporal_dim" , ["t" , "datezz" ])
28932893 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)
28962894 stac_path = tmp_path / "stac.json"
28972895 stac_data = StacDummyBuilder .collection (
28982896 cube_dimensions = {temporal_dim : {"type" : "temporal" , "extent" : ["2024-01-01" , "2024-04-04" ]}}
28992897 )
2898+ # TODO #738 real request mocking of STAC resources compatible with pystac?
29002899 stac_path .write_text (json .dumps (stac_data ))
29012900
29022901 cube = con120 .load_stac (str (stac_path ))
@@ -2952,6 +2951,7 @@ def test_load_stac_no_cube_extension_temporal_dimension(self, con120, tmp_path,
29522951 # No cube:dimensions, but at least "temporal" extent is set as indicator for having a temporal dimension
29532952 assert "cube:dimensions" not in stac_data
29542953 assert deep_get (stac_data , "extent" , "temporal" )
2954+ # TODO #738 real request mocking of STAC resources compatible with pystac?
29552955 stac_path .write_text (json .dumps (stac_data ))
29562956
29572957 cube = con120 .load_stac (str (stac_path ))
@@ -2962,6 +2962,7 @@ def test_load_stac_band_filtering(self, con120, tmp_path):
29622962 stac_data = StacDummyBuilder .collection (
29632963 summaries = {"eo:bands" : [{"name" : "B01" }, {"name" : "B02" }, {"name" : "B03" }]}
29642964 )
2965+ # TODO #738 real request mocking of STAC resources compatible with pystac?
29652966 stac_path .write_text (json .dumps (stac_data ))
29662967
29672968 cube = con120 .load_stac (str (stac_path ))
0 commit comments