

def test_unprotected(self):
    for api in ['GET:/v2', 'GET:/v2/', 'GET:/v3.0', 'GET:/v3.0/', 'GET:/v10.22', 'POST:/v2.0/tokens', 'POST:/v2.1/tokens', 'GET:/v2/tokens/a8Vs7bS', 'GET:/v2.0/tokens/a8Vs7bS', 'POST:/v3/auth/tokens']:
        req = MagicMock()
        req.headers = {
            'X-AUTH-TOKEN': None,
        }
        api.method = api.split(':')[0]
        req.path = api.split(':')[1]
        req.env = {
            
        }
        resp = MagicMock()
        validate_token(req, resp, {
            
        })
        self.assertIsNone(req.env.get('auth'))

dataset/ETHPy150Open softlayer/jumpgate/tests/jumpgate-tests/common/hooks/test_hooks.py TestHookAuthToken.test_unprotected/VarMisuse@56/157 `req`->`api`