'Test delete method that removes an image from the cache.'

@skip_if_disabled
def test_delete_all(self):

    for image_id in (1, 2):
        self.assertFalse(self.cache.is_cached(image_id))
    for image_id in (1, 2):
        FIXTURE_FILE = six.BytesIO(FIXTURE_DATA)
        self.assertTrue(self.cache.cache_image_file(image_id, FIXTURE_FILE))
    for image_id in (1, 2):
        self.assertTrue(self.cache.is_cached(image_id))
    self.cache.delete_all_cached_images()
    for image_id in (1, 2):
        self.assertFalse(self.cache.is_cached(image_id))
