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

Method testNonJsonDataReturnedByGithub

tests/Exceptions.py:73–86  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 )
72
73 def testNonJsonDataReturnedByGithub(self):
74 # Replay data was forged according to https://github.com/jacquev6/PyGithub/pull/182
75 with self.assertRaises(github.GithubException) as raisedexp:
76 # 503 would be retried, disable retries
77 self.get_github(self.authMode, retry=None).get_user("jacquev6")
78 self.assertIsInstance(raisedexp.exception, github.GithubException)
79 self.assertIsNone(raisedexp.exception.message)
80 self.assertEqual(raisedexp.exception.status, 503)
81 self.assertEqual(
82 raisedexp.exception.data,
83 {
84 "data": "<html><body><h1>503 Service Unavailable</h1>No server is available to handle this request.</body></html>",
85 },
86 )
87
88 def testUnknownObject(self):
89 with self.assertRaises(github.GithubException) as raisedexp:

Callers

nothing calls this directly

Calls 2

get_userMethod · 0.80
get_githubMethod · 0.80

Tested by

no test coverage detected