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

Method testBaseUrlHostRedirection

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

get_repoMethod · 0.95

Tested by

no test coverage detected