File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ def test_remote_spatial_image_img_raster(monkeypatch):
3838 image_url = "https://example.com/test_image.jpg"
3939 spi_remote = construct_spatial_image_class (image_url , is_url = True )
4040
41- # Mock the _download_image method to return an image
41+ # Mock the _get_cached_path method to return an image
4242 mock_path = "tests/images/sample_image1.jpg"
43- monkeypatch .setattr (spi_remote , "_download_image " , lambda : mock_path )
43+ monkeypatch .setattr (spi_remote , "_get_cached_path " , lambda : mock_path )
4444
4545 raster = spi_remote .img_raster ()
4646
@@ -54,7 +54,7 @@ def mock_download():
5454 num_calls += 1
5555 return mock_path
5656
57- monkeypatch .setattr (spi_remote , "_download_image " , mock_download )
57+ monkeypatch .setattr (spi_remote , "_get_cached_path " , mock_download )
5858
5959 raster2 = spi_remote .img_raster ()
6060 assert num_calls == 0
Original file line number Diff line number Diff line change @@ -60,9 +60,9 @@ def test_remote_spatial_image_img_source_with_mock(monkeypatch):
6060
6161 assert isinstance (spi_remote , RemoteSpatialImage )
6262
63- # Mock the _download_image method to return a fixed path
63+ # Mock the _get_cached_path method to return a fixed path
6464 mock_path = Path ("/tmp/image.jpg" )
65- monkeypatch .setattr (spi_remote , "_download_image " , lambda : mock_path )
65+ monkeypatch .setattr (spi_remote , "_get_cached_path " , lambda : mock_path )
6666
6767 # Test with as_path=True (returns the cached path)
6868 source_path = spi_remote .img_source (as_path = True )
You can’t perform that action at this time.
0 commit comments