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

Method testBaseUrlPortRedirection

tests/Requester.py:245–258  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

243 )
244
245 def testBaseUrlPortRedirection(self):
246 # replay data forged
247 gh = github.Github(base_url="https://api.github.com")
248 with self.assertRaises(RuntimeError) as exc:
249 gh.get_repo("PyGithub/PyGithub")
250 self.assertEqual(
251 exc.exception.args,
252 (
253 "Requested https://api.github.com/repos/PyGithub/PyGithub but server "
254 "redirected to https://api.github.com:443/repos/PyGithub/PyGithub, "
255 "you may need to correct your Github server URL "
256 "via base_url: Github(base_url=...)",
257 ),
258 )
259
260 def testBaseUrlPrefixRedirection(self):
261 # replay data forged

Callers

nothing calls this directly

Calls 1

get_repoMethod · 0.95

Tested by

no test coverage detected