def test_get(self): Base.post.side_effect = paypal.UnauthorizedAccess('', '') self.assertRaises(paypal.UnauthorizedAccess, Userinfo.get, "invalid") Base.post.assert_called_once_with('v1/identity/openidconnect/userinfo', { 'access_token': 'invalid', 'schema': 'openid' })
def test_userinfo(self): Base.post.side_effect = paypal.UnauthorizedAccess('', '') self.assertRaises(paypal.UnauthorizedAccess, Tokeninfo().userinfo, {}) Base.post.assert_called_once_with('v1/identity/openidconnect/userinfo', { 'access_token': None, 'schema': 'openid' })