Exemple #1
0
 def cache_image_ko_test(self):
     """Image: URL does not contain an image"""
     image = Image(title='title1', description='Description1', url="http://www.google.com")
     image.cache_image()
Exemple #2
0
 def cache_image_ok_test(self):
     """Image: Cache image"""
     image = Image(title='title1', description='Description1', url="http://comps.canstockphoto.com/can-stock-photo_csp9177473.jpg")
     image.cache_image()
     cached_image = image.image
     self.assertIsNotNone(cached_image)