From b31f8cd802477171b0e224ec845ef7159fd903dc Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Sat, 12 Dec 2015 16:58:49 -0800 Subject: [PATCH] Remove tests for Google fetchart backend (#1760) --- test/test_art.py | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/test/test_art.py b/test/test_art.py index 04bfe3eed..cb29f3769 100644 --- a/test/test_art.py +++ b/test/test_art.py @@ -226,38 +226,6 @@ class AAOTest(_common.TestCase): self.assertEqual(list(res), []) -class GoogleImageTest(_common.TestCase): - - _google_url = 'https://ajax.googleapis.com/ajax/services/search/images' - - def setUp(self): - super(GoogleImageTest, self).setUp() - self.source = fetchart.GoogleImages(logger) - - @responses.activate - def run(self, *args, **kwargs): - super(GoogleImageTest, self).run(*args, **kwargs) - - def mock_response(self, url, json): - responses.add(responses.GET, url, body=json, - content_type='application/json') - - def test_google_art_finds_image(self): - album = _common.Bag(albumartist="some artist", album="some album") - json = b"""{"responseData": {"results": - [{"unescapedUrl": "url_to_the_image"}]}}""" - self.mock_response(self._google_url, json) - result_url = self.source.get(album) - self.assertEqual(list(result_url)[0], 'url_to_the_image') - - def test_google_art_dont_finds_image(self): - album = _common.Bag(albumartist="some artist", album="some album") - json = b"""bla blup""" - self.mock_response(self._google_url, json) - result_url = self.source.get(album) - self.assertEqual(list(result_url), []) - - class ArtImporterTest(UseThePlugin): def setUp(self): super(ArtImporterTest, self).setUp()