@@ -537,24 +537,28 @@ def test_execute_mask(api):
537
537
api .check_result ("mask.json" )
538
538
assert dummy_backend .get_collection ("S2_FAPAR_CLOUDCOVER" ).mask .call_count == 1
539
539
540
- expected = {
540
+ expected_spatial_extent = {
541
541
"west" : 7.02 ,
542
542
"south" : 51.2 ,
543
543
"east" : 7.65 ,
544
544
"north" : 51.7 ,
545
- "crs" : ' EPSG:4326' ,
545
+ "crs" : " EPSG:4326" ,
546
546
}
547
- expected_geometry = shapely .geometry .shape ({
548
- "type" : "Polygon" ,
549
- "coordinates" : [[[7.02 , 51.7 ], [7.65 , 51.7 ], [7.65 , 51.2 ], [7.04 , 51.3 ], [7.02 , 51.7 ]]]
550
- })
547
+ expected_geometry = DriverVectorCube .from_geojson (
548
+ {
549
+ "type" : "Polygon" ,
550
+ "coordinates" : [
551
+ [[7.02 , 51.7 ], [7.65 , 51.7 ], [7.65 , 51.2 ], [7.04 , 51.3 ], [7.02 , 51.7 ]],
552
+ ],
553
+ }
554
+ )
551
555
552
556
params = dummy_backend .last_load_collection_call ('PROBAV_L3_S10_TOC_NDVI_333M_V2' )
553
- assert params ["spatial_extent" ] == expected
557
+ assert params ["spatial_extent" ] == expected_spatial_extent
554
558
assert params ["aggregate_spatial_geometries" ] == expected_geometry
555
559
556
560
params = dummy_backend .last_load_collection_call ('S2_FAPAR_CLOUDCOVER' )
557
- assert params ["spatial_extent" ] == expected
561
+ assert params ["spatial_extent" ] == expected_spatial_extent
558
562
559
563
560
564
def test_execute_mask_optimized_loading (api ):
@@ -563,24 +567,28 @@ def test_execute_mask_optimized_loading(api):
563
567
)
564
568
assert dummy_backend .get_collection ("S2_FAPAR_CLOUDCOVER" ).mask .call_count == 1
565
569
566
- expected = {
570
+ expected_spatial_extent = {
567
571
"west" : 7.02 ,
568
572
"south" : 51.2 ,
569
573
"east" : 7.65 ,
570
574
"north" : 51.7 ,
571
- "crs" : ' EPSG:4326' ,
575
+ "crs" : " EPSG:4326" ,
572
576
}
573
- expected_geometry = shapely .geometry .shape ({
574
- "type" : "Polygon" ,
575
- "coordinates" : [[[7.02 , 51.7 ], [7.65 , 51.7 ], [7.65 , 51.2 ], [7.04 , 51.3 ], [7.02 , 51.7 ]]]
576
- })
577
+ expected_geometry = DriverVectorCube .from_geojson (
578
+ {
579
+ "type" : "Polygon" ,
580
+ "coordinates" : [
581
+ [[7.02 , 51.7 ], [7.65 , 51.7 ], [7.65 , 51.2 ], [7.04 , 51.3 ], [7.02 , 51.7 ]],
582
+ ],
583
+ }
584
+ )
577
585
578
586
params = dummy_backend .last_load_collection_call ('S2_FAPAR_CLOUDCOVER' )
579
- assert params ["spatial_extent" ] == expected
587
+ assert params ["spatial_extent" ] == expected_spatial_extent
580
588
assert isinstance (params .data_mask , DriverDataCube )
581
589
582
590
params = dummy_backend .last_load_collection_call ('PROBAV_L3_S10_TOC_NDVI_333M_V2' )
583
- assert params ["spatial_extent" ] == expected
591
+ assert params ["spatial_extent" ] == expected_spatial_extent
584
592
assert params ["aggregate_spatial_geometries" ] == expected_geometry
585
593
586
594
0 commit comments