'Tests that the registry API delete returns the image metadata'

def test_delete_image_response(self):

    image = self.FIXTURES[0]
    req = webob.Request.blank('/rpc')
    req.method = 'POST'
    cmd = [{'command': 'image_destroy', 'kwargs': {'image_id': image['id']}}]
    req.body = jsonutils.dump_as_bytes(cmd)
    res = req.get_response(self.api)
    self.assertEqual(http.OK, res.status_int)
    deleted_image = jsonutils.loads(res.body)[0]
    self.assertEqual(image['id'], deleted_image['id'])
    self.assertTrue(deleted_image['deleted'])
    self.assertTrue(deleted_image['deleted_at'])
