'Tests adding members to deleted image raises 404.'

def test_create_member_to_deleted_image_raises_404(self):

    test_router = router.API(self.mapper)
    self.api = test_utils.FakeAuthMiddleware(test_router, is_admin=True)
    req = webob.Request.blank(('/images/%s' % UUID2))
    req.method = 'DELETE'
    res = req.get_response(self.api)
    self.assertEqual(http_client.OK, res.status_int)
    req = webob.Request.blank(('/images/%s/members/pattieblack' % UUID2))
    req.method = 'PUT'
    res = req.get_response(self.api)
    self.assertEqual(webob.exc.HTTPNotFound.code, res.status_int)
    self.assertIn(('Image    with    identifier    %s    has    been    deleted.' % UUID2), res.body.decode())
