Пример #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)
Пример #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)
Пример #3
0
 def test_invalid_type_returns_none(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertEqual(artpath, None)
Пример #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)
Пример #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)
Пример #6
0
 def test_invalid_type_returns_none(self):
     fetchart.urllib.urlretrieve = MockUrlRetrieve('')
     artpath = fetchart._fetch_image('http://example.com')
     self.assertEqual(artpath, None)
Пример #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)
Пример #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)