Example #1
0
def test_url_for_commit():
    partial_project_data = {"name": "hadroncollider", "owner": "cern"}
    url = ApiSchema.url_for_commit(host="http://localhost",
                                   project_data=partial_project_data,
                                   commit="12345678")
    assert url == "http://localhost/api/v1/projects/cern/hadroncollider/commits/12345678"
Example #2
0
def get_artifacts_for_commit(host, api_token, project_config_file, commit):
    url = ApiSchema.url_for_commit(host, project_config_file, commit)
    artifact_list = http_get_json(url, api_token)
    return artifact_list