(self)
| 231 | ) |
| 232 | |
| 233 | def testBaseUrlHostRedirection(self): |
| 234 | gh = github.Github(base_url="https://www.github.com") |
| 235 | with self.assertRaises(RuntimeError) as exc: |
| 236 | gh.get_repo("PyGithub/PyGithub") |
| 237 | self.assertEqual( |
| 238 | exc.exception.args, |
| 239 | ( |
| 240 | "Github server redirected from host www.github.com to github.com, " |
| 241 | "please correct your Github server URL via base_url: Github(base_url=...)", |
| 242 | ), |
| 243 | ) |
| 244 | |
| 245 | def testBaseUrlPortRedirection(self): |
| 246 | # replay data forged |