77from shapely import wkt
88from shapely .geometry import GeometryCollection , MultiPolygon , Point , Polygon
99
10+ from mapswipe_workers .definitions import CustomError
1011from mapswipe_workers .utils .process_mapillary import (
1112 coordinate_download ,
1213 create_tiles ,
@@ -326,7 +327,7 @@ def test_get_image_metadata_no_rows(self, mock_coordinate_download):
326327 "start_time" : "1916-01-20 00:00:00" ,
327328 "end_time" : "1922-01-21 23:59:59" ,
328329 }
329- with self .assertRaises (ValueError ):
330+ with self .assertRaises (CustomError ):
330331 get_image_metadata (self .fixture_data , ** params )
331332
332333 @patch ("mapswipe_workers.utils.process_mapillary.coordinate_download" )
@@ -335,7 +336,7 @@ def test_get_image_metadata_empty_response(self, mock_coordinate_download):
335336 df = df .drop (df .index )
336337 mock_coordinate_download .return_value = df
337338
338- with self .assertRaises (ValueError ):
339+ with self .assertRaises (CustomError ):
339340 get_image_metadata (self .fixture_data )
340341
341342 @patch ("mapswipe_workers.utils.process_mapillary.filter_results" )
@@ -346,7 +347,7 @@ def test_get_image_metadata_size_restriction(
346347 mock_filter_results .return_value = pd .DataFrame ({"ID" : range (1 , 100002 )})
347348 mock_coordinate_download .return_value = self .fixture_df
348349
349- with self .assertRaises (ValueError ):
350+ with self .assertRaises (CustomError ):
350351 get_image_metadata (self .fixture_data )
351352
352353
0 commit comments