Exemplo n.º 1
0
def test_get_download_url_download_url_in_repo_version():
    repo_data = {}
    external_url = 'https://github.com/alikins/collection_reqs_test'
    repoversion = EXAMPLE_REPO_VERSIONS_LIST[0]
    res = galaxy_url.get_download_url(repo_data=repo_data,
                                      external_url=external_url,
                                      repoversion=repoversion)

    log.debug('res: %s', res)
    assert res == EXAMPLE_REPO_VERSIONS_LIST[0]['download_url']
Exemplo n.º 2
0
def test_get_download_url_empty_data():
    repo_data = {}
    external_url = ""
    repoversion = []
    res = galaxy_url.get_download_url(repo_data=repo_data,
                                      external_url=external_url,
                                      repoversion=repoversion)

    log.debug('res: %s', res)
    assert res is None
Exemplo n.º 3
0
def test_get_download_url_download_url_in_repo_data():
    download_url = 'https://github.com/alikins/collection_reqs_test/archive/0.0.13.tar.gz'
    repo_data = {'download_url': download_url}
    external_url = 'https://github.com/alikins/collection_reqs_test'
    repoversion = []
    res = galaxy_url.get_download_url(repo_data=repo_data,
                                      external_url=external_url,
                                      repoversion=repoversion)

    log.debug('res: %s', res)
    assert res == download_url
Exemplo n.º 4
0
def test_get_download_url_no_download_url_in_repodata_or_repoversion():
    repo_data = {}
    external_url = 'https://github.com/alikins/collection_reqs_test'
    repoversion = EXAMPLE_REPO_VERSIONS_LIST[0].copy()
    del repoversion['download_url']

    res = galaxy_url.get_download_url(repo_data=repo_data,
                                      external_url=external_url,
                                      repoversion=repoversion)

    log.debug('res: %s', res)
    assert res == 'https://github.com/alikins/collection_reqs_test/archive/1.0.6.tar.gz'