Skip to content

Commit 538c763

Browse files
committed
fix(street): adjust tests
1 parent c3dca08 commit 538c763

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mapswipe_workers/tests/unittests/test_process_mapillary.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from shapely import wkt
88
from shapely.geometry import GeometryCollection, MultiPolygon, Point, Polygon
99

10+
from mapswipe_workers.definitions import CustomError
1011
from 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

Comments
 (0)