

def test_upstream_preauth(self):
    req = MagicMock()
    auth = {
        'user': 'jsmith',
    }
    req.headers = {
        
    }
    req.method = 'GET'
    req.path = '/v2/servers'
    req.env = {
        'auth': auth,
    }
    resp = MagicMock()
    validate_token(req, resp, {
        
    })
    self.assertEquals(req.env.get('auth'), auth)

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