示例#1
0
async def test_zenodo():
    spec = '10.5281/zenodo.3242074'

    provider = ZenodoProvider(spec=spec)

    # have to resolve the ref first
    ref = await provider.get_resolved_ref()
    assert ref == '3242074'

    slug = provider.get_build_slug()
    assert slug == 'zenodo-3242074'
    repo_url = provider.get_repo_url()
    assert repo_url == spec
示例#2
0
async def test_zenodo(spec, resolved_spec, resolved_ref, resolved_ref_url, build_slug):
    provider = ZenodoProvider(spec=spec)

    # have to resolve the ref first
    ref = await provider.get_resolved_ref()
    assert ref == resolved_ref

    slug = provider.get_build_slug()
    assert slug == build_slug
    repo_url = provider.get_repo_url()
    assert repo_url == spec
    ref_url = await provider.get_resolved_ref_url()
    assert ref_url == resolved_ref_url
    spec = await provider.get_resolved_spec()
    assert spec == resolved_spec