'Test delete image members raises right exception'

def test_delete_image_member_non_shared_image_forbidden(self):

    test_rserver_api = rserver.API(self.mapper)
    api = test_utils.FakeAuthMiddleware(test_rserver_api, is_admin=False)
    UUID9 = _gen_uuid()
    extra_fixture = self.get_fixture(id=UUID9, size=19, protected=False)
    db_api.image_create(self.context, extra_fixture)
    test_uri = '/images/%s/members/test_add_member_to_non_share_image'
    req = webob.Request.blank((test_uri % UUID9))
    req.headers['X-Auth-Token'] = 'test1:test1:'
    req.method = 'DELETE'
    req.content_type = 'application/json'
    res = req.get_response(api)
    self.assertEqual(http.FORBIDDEN, res.status_int)
