Skip to content
Snippets Groups Projects
Commit 4fbfe056 authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Changed the transform in test of process

parent 0f2d60a0
No related branches found
No related tags found
No related merge requests found
Pipeline #2016 failed
...@@ -21,10 +21,14 @@ def test_process_geotiff(): ...@@ -21,10 +21,14 @@ def test_process_geotiff():
# Mock glob to return a dummy file path # Mock glob to return a dummy file path
mock_glob.return_value = ['dummy.tif'] mock_glob.return_value = ['dummy.tif']
# Mock the rasterio open function # Mock the rasterio open function
mock_src = mock_raster.return_value.__enter__.return_value mock_src = mock_raster.return_value.__enter__.return_value
mock_src.read.return_value = np.random.rand(1, 10, 10) mock_src.read.return_value = np.random.rand(1, 10, 10)
mock_src.transform = Affine.translation(0, 0) * Affine.scale(1, -1) # Mock a valid transform
# Correctly mock a valid affine transform (parameters: a, b, c, d, e, f)
mock_src.transform = Affine(1, 0, 0, # a, b, c
0, -1, 0) # d, e, f
mock_src.crs = 'EPSG:4326' # CRS should match the polygon's CRS mock_src.crs = 'EPSG:4326' # CRS should match the polygon's CRS
# Instantiate the service # Instantiate the service
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment