MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testGetAccessToken

Method testGetAccessToken

tests/ApplicationOAuth.py:68–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

66 self.assertTrue(f"client_id={self.CLIENT_ID}" in self.app.get_login_url(state="123abc", login="user"))
67
68 def testGetAccessToken(self):
69 access_token = self.app.get_access_token("oauth_code_removed", state="state_removed")
70 # Test string representation
71 self.assertEqual(
72 str(access_token),
73 'AccessToken(type="bearer", token="acces...", scope="", '
74 "refresh_token_expires_in=None, refresh_token=None, expires_in=None)",
75 )
76 self.assertEqual(access_token.token, "access_token_removed")
77 self.assertEqual(access_token.type, "bearer")
78 self.assertEqual(access_token.scope, "")
79 self.assertIsNone(access_token.expires_in)
80 self.assertIsNone(access_token.expires_at)
81 self.assertIsNone(access_token.refresh_token)
82 self.assertIsNone(access_token.refresh_expires_in)
83 self.assertIsNone(access_token.refresh_expires_at)
84
85 def testEnterpriseSupport(self):
86 requester = self.ent_gh._Github__requester

Callers

nothing calls this directly

Calls 1

get_access_tokenMethod · 0.45

Tested by

no test coverage detected