def test_load_error_406(): filename = 'wildebeest_gray.jpg' url = f'{SAMPLE_DATA_BASE_URL}/{filename}' responses.add(responses.GET, url, status=406) with pytest.raises(HTTPError): with mock.patch('requests.Response'): result = load_image_from_url(inpath=url) assert result.status_code == 406
def wildebeest_rgba_remote(): filename = 'wildebeest_rgba.png' url = f'{SAMPLE_DATA_BASE_URL}/{filename}' return load_image_from_url(url)