'Tests that exception raised trying to update a deleted image'

def test_update_deleted_image(self):

    req = webob.Request.blank(('/images/%s' % UUID2))
    req.method = 'DELETE'
    res = req.get_response(self.api)
    self.assertEqual(http_client.OK, res.status_int)
    fixture = {'name': 'test_del_img'}
    req = webob.Request.blank(('/images/%s' % UUID2))
    req.method = 'PUT'
    req.content_type = 'application/json'
    req.body = jsonutils.dump_as_bytes(dict(image=fixture))
    res = req.get_response(self.api)
    self.assertEqual(http_client.FORBIDDEN, res.status_int)
    self.assertIn('Forbidden    to    update    deleted    image', res.body)
