Esempio n. 1
0
 def test_jpeg_type_returns_path(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('somepath', 'image/jpeg')
     artpath = fetchart.art_for_asin('xxxx')
     self.assertEqual(artpath, 'somepath')
Esempio n. 2
0
 def test_invalid_type_returns_none(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('path', '')
     artpath = fetchart.art_for_asin('xxxx')
     self.assertEqual(artpath, None)