'Test for determining that when an admin tries to download a deleted
image it returns 404 Not Found error.'

def test_v1_deleted_image_fetch(self):

    def dummy_img_iterator():
        for i in range(3):
            (yield i)
    image_id = 'test1'
    image_meta = {'id': image_id, 'name': 'fake_image', 'status': 'deleted', 'created_at': '', 'min_disk': '10G', 'min_ram': '1024M', 'protected': False, 'locations': '', 'checksum': 'c1234', 'owner': '', 'disk_format': 'raw', 'container_format': 'bare', 'size': '123456789', 'virtual_size': '123456789', 'is_public': 'public', 'deleted': True, 'updated_at': '', 'properties': {}}
    request = webob.Request.blank(('/v1/images/%s' % image_id))
    request.context = context.RequestContext()
    cache_filter = ProcessRequestTestCacheFilter()
    self.assertRaises(exception.NotFound, cache_filter._process_v1_request, request, image_id, dummy_img_iterator, image_meta)
