@@ -45,20 +45,28 @@ def test_get_repository_info(gh, session):
4545
4646 assert info == github .RepositoryInfo (default_branch = "baz" , visibility = "public" )
4747
48+
4849@pytest .mark .parametrize (
4950 "api_url, expected" ,
5051 [
5152 ("https://api.github.com/repos/foo/bar" , "https://github.com" ),
5253 ("https://api.github.com:8080/repos/foo/bar" , "https://github.com:8080" ),
5354 ("https://api.github.com/repos/foo/bar/issues" , "https://github.com" ),
54- ("https://my-ghe.company.com/api/v3/repos/foo/bar" , "https://my-ghe.company.com" ),
55- ("https://my-ghe.company.com/api/v3/repos/foo/bar/issues" , "https://my-ghe.company.com" ),
56- ]
55+ (
56+ "https://my-ghe.company.com/api/v3/repos/foo/bar" ,
57+ "https://my-ghe.company.com" ,
58+ ),
59+ (
60+ "https://my-ghe.company.com/api/v3/repos/foo/bar/issues" ,
61+ "https://my-ghe.company.com" ,
62+ ),
63+ ],
5764)
5865def test_extract_github_host (api_url , expected ):
5966 result = github .extract_github_host (api_url = api_url )
6067 assert result == expected
6168
69+
6270def test_download_artifact (gh , session , zip_bytes ):
6371 artifacts = [
6472 {"name" : "bar" , "id" : 456 },
0 commit comments