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

Method testAppAuthentication

tests/Authentication.py:95–108  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 )
94
95 def testAppAuthentication(self):
96 with self.assertWarns(DeprecationWarning) as warning:
97 app_auth = github.AppAuthentication(
98 app_id=APP_ID,
99 private_key=PRIVATE_KEY,
100 installation_id=29782936,
101 )
102 g = github.Github(app_auth=app_auth)
103 self.assertEqual(g.get_user("ammarmallik").name, "Ammar Akbar")
104 self.assertWarnings(
105 warning,
106 "Use github.Auth.AppInstallationAuth instead",
107 "Argument app_auth is deprecated, please use auth=github.Auth.AppInstallationAuth(...) instead",
108 )
109
110 def testLoginAuthentication(self):
111 # test data copied from testBasicAuthentication to test parity

Callers

nothing calls this directly

Calls 2

get_userMethod · 0.95
assertWarningsMethod · 0.80

Tested by

no test coverage detected