コード例 #1
0
ファイル: test_art.py プロジェクト: zhang-xun/beets
 def test_google_art_finds_image(self):
     album = _common.Bag(albumartist="some artist", album="some album")
     json = """{"responseData": {"results":
         [{"unescapedUrl": "url_to_the_image"}]}}"""
     self.mock_response(self._google_url, json)
     result_url = fetchart.google_art(album)
     self.assertEqual(result_url, 'url_to_the_image')
コード例 #2
0
ファイル: test_art.py プロジェクト: Lukas0907/beets
 def test_google_art_finds_image(self):
     album = _common.Bag(albumartist="some artist", album="some album")
     json = """{"responseData": {"results":
         [{"unescapedUrl": "url_to_the_image"}]}}"""
     self.mock_response(self._google_url, json)
     result_url = fetchart.google_art(album)
     self.assertEqual(result_url, 'url_to_the_image')
コード例 #3
0
ファイル: test_art.py プロジェクト: zhang-xun/beets
 def test_google_art_dont_finds_image(self):
     album = _common.Bag(albumartist="some artist", album="some album")
     json = """bla blup"""
     self.mock_response(self._google_url, json)
     result_url = fetchart.google_art(album)
     self.assertEqual(result_url, None)
コード例 #4
0
ファイル: test_art.py プロジェクト: Lukas0907/beets
 def test_google_art_dont_finds_image(self):
     album = _common.Bag(albumartist="some artist", album="some album")
     json = """bla blup"""
     self.mock_response(self._google_url, json)
     result_url = fetchart.google_art(album)
     self.assertEqual(result_url, None)