Example #1
0
 def test_jpeg_type_returns_path(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('image/jpeg')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertNotEqual(artpath, None)
Example #2
0
 def test_jpeg_type_returns_path(self):
     self.mock_response('image/jpeg')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertNotEqual(artpath, None)
Example #3
0
 def test_invalid_type_returns_none(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertEqual(artpath, None)
Example #4
0
 def test_invalid_type_returns_none(self):
     self.mock_response('image/watercolour')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertEqual(artpath, None)
Example #5
0
 def test_jpeg_type_returns_path(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('image/jpeg')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertNotEqual(artpath, None)
Example #6
0
 def test_invalid_type_returns_none(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertEqual(artpath, None)
Example #7
0
 def test_jpeg_type_returns_path(self):
     self.mock_response('image/jpeg')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertNotEqual(artpath, None)
Example #8
0
 def test_invalid_type_returns_none(self):
     self.mock_response('image/watercolour')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertEqual(artpath, None)