def testIgnoreHttpsFromGithubEnterpriseWithPort(self):
g = github.Github(self.login, self.password, base_url="http://my.enterprise.com:1234/some/prefix") # http here
org = g.get_organization("BeaverSoftware")
self.assertEqual(org.url, "https://my.enterprise.com:1234/some/prefix/orgs/BeaverSoftware") # https returned
self.assertListKeyEqual(org.get_repos(), lambda r: r.name, ["FatherBeaver", "TestPyGithub"]) # But still http in second request based on org.url
评论列表
文章目录