

def test_invalid_auth(self):
    req = MagicMock()
    req.headers = {
        'X-AUTH-TOKEN': 'IAMBAD',
    }
    req.method = 'GET'
    req.path = '/v2/servers'
    req.env = {
        
    }
    resp = MagicMock()
    with self.assertRaises(InvalidTokenError):
        validate_token(req, resp, {
            
        })
    self.assertIsNone(req.env.get('auth'))

dataset/ETHPy150Open softlayer/jumpgate/tests/jumpgate-tests/common/hooks/test_hooks.py TestHookAuthToken.test_invalid_auth/original