(self)
| 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: |
nothing calls this directly
no test coverage detected