示例#1
0
 def test_aao_scraper_finds_image(self):
     self.page_text = """
     <br />
     <a href="TARGET_URL" title="View larger image" class="thickbox" style="color: #7E9DA2; text-decoration:none;">
     <img src="http://www.albumart.org/images/zoom-icon.jpg" alt="View larger image" width="17" height="15"  border="0"/></a>
     """
     res = fetchart.aao_art('x')
     self.assertEqual(res, 'TARGET_URL')
示例#2
0
文件: test_art.py 项目: Lugoues/beets
 def test_aao_scraper_finds_image(self):
     self.page_text = """
     <br />
     <a href="TARGET_URL" title="View larger image" class="thickbox" style="color: #7E9DA2; text-decoration:none;">
     <img src="http://www.albumart.org/images/zoom-icon.jpg" alt="View larger image" width="17" height="15"  border="0"/></a>
     """
     res = fetchart.aao_art('x')
     self.assertEqual(res, 'TARGET_URL')
示例#3
0
文件: test_art.py 项目: dreewoo/beets
 def test_aao_scraper_finds_image(self):
     body = """
     <br />
     <a href="TARGET_URL" title="View larger image"
        class="thickbox" style="color: #7E9DA2; text-decoration:none;">
     <img src="http://www.albumart.org/images/zoom-icon.jpg"
          alt="View larger image" width="17" height="15"  border="0"/></a>
     """
     self.mock_response(self.AAO_URL, body)
     album = _common.Bag(asin=self.ASIN)
     res = fetchart.aao_art(album)
     self.assertEqual(list(res)[0], 'TARGET_URL')
示例#4
0
 def test_aao_scraper_finds_image(self):
     body = """
     <br />
     <a href="TARGET_URL" title="View larger image"
        class="thickbox" style="color: #7E9DA2; text-decoration:none;">
     <img src="http://www.albumart.org/images/zoom-icon.jpg"
          alt="View larger image" width="17" height="15"  border="0"/></a>
     """
     self.mock_response(self.AAO_URL, body)
     album = _common.Bag(asin=self.ASIN)
     res = fetchart.aao_art(album)
     self.assertEqual(list(res)[0], 'TARGET_URL')
示例#5
0
文件: test_art.py 项目: Lugoues/beets
 def test_aao_scraper_returns_none_when_no_image_present(self):
     self.page_text = "blah blah"
     res = fetchart.aao_art('x')
     self.assertEqual(res, None)
示例#6
0
 def test_aao_scraper_returns_none_when_no_image_present(self):
     self.mock_response(self.AAO_URL, 'blah blah')
     res = fetchart.aao_art(self.ASIN)
     self.assertEqual(res, None)
示例#7
0
 def test_aao_scraper_returns_none_when_no_image_present(self):
     self.page_text = "blah blah"
     res = fetchart.aao_art('x')
     self.assertEqual(self.retriever.fetched, None)
     self.assertEqual(res, None)
示例#8
0
文件: test_art.py 项目: SUTJael/beets
 def test_aao_scraper_returns_none_when_no_image_present(self):
     self.mock_response(self.AAO_URL, 'blah blah')
     res = fetchart.aao_art(self.ASIN)
     self.assertEqual(res, None)
示例#9
0
文件: test_art.py 项目: dreewoo/beets
 def test_aao_scraper_returns_no_result_when_no_image_present(self):
     self.mock_response(self.AAO_URL, 'blah blah')
     album = _common.Bag(asin=self.ASIN)
     res = fetchart.aao_art(album)
     self.assertEqual(list(res), [])
示例#10
0
 def test_aao_scraper_returns_no_result_when_no_image_present(self):
     self.mock_response(self.AAO_URL, 'blah blah')
     album = _common.Bag(asin=self.ASIN)
     res = fetchart.aao_art(album)
     self.assertEqual(list(res), [])