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