def test_invalid_path(self, image_fetcher: ImageFetcher) -> None: resolution = ResolutionName.HIGH path = "path" with pytest.raises(InvalidPathError) as error: image_fetcher.get_resolution_path(path, resolution) assert error.value.message == f"Invalid image path: '{path}'"
def test_non_raw_path(self, image_fetcher: ImageFetcher) -> None: resolution = ResolutionName.HIGH path = "path/image.jpg" output_path = f"path/resized_images/image.{resolution.lower()}.jpg" assert image_fetcher.get_resolution_path(path, resolution) == output_path
def test_raw_path(self, image_fetcher: ImageFetcher) -> None: path = "path/image.jpg" assert image_fetcher.get_resolution_path(path, ResolutionName.RAW) == path