def test_identity_set_up_at_call(self):
        def fake_start_response(*args, **kwargs):
            pass
        the_env = self._get_identity(
            tenant_id='test', roles=['reselleradmin'])
        self.test_auth(the_env, fake_start_response)

        subreq = Request.blank(
            '/v1/%s/c/o' % get_account_for_tenant(self.test_auth, 'test'))
        subreq.environ.update(
            self._get_identity(tenant_id='test', roles=['got_erased']))

        authorize_resp = the_env['swift.authorize'](subreq)
        self.assertEqual(authorize_resp, None)
dataset/ETHPy150Open openstack/swift/test/unit/common/middleware/test_keystoneauth.py/TestAuthorize.test_identity_set_up_at_call/original