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

Method testBaseUrlSchemeRedirection

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

Source from the content-addressed store, hash-verified

219 )
220
221 def testBaseUrlSchemeRedirection(self):
222 gh = github.Github(base_url="http://api.github.com")
223 with self.assertRaises(RuntimeError) as exc:
224 gh.get_repo("PyGithub/PyGithub")
225 self.assertEqual(
226 exc.exception.args,
227 (
228 "Github server redirected from http protocol to https, please correct your "
229 "Github server URL via base_url: Github(base_url=...)",
230 ),
231 )
232
233 def testBaseUrlHostRedirection(self):
234 gh = github.Github(base_url="https://www.github.com")

Callers

nothing calls this directly

Calls 1

get_repoMethod · 0.95

Tested by

no test coverage detected