Exemple #1
0
 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'
                                       })
Exemple #2
0
 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'
                                       })