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()
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)