Esempio n. 1
0
def test_get_meta_with_missing_metadta(md5dirs):
    hashes, dirs, tmpdir = md5dirs
    md5 = hashes[0]
    with pytest.raises(IOError):
        mod.get_meta(tmpdir, md5)
Esempio n. 2
0
def test_get_meta_with_bad_metadta(bad_metadata_dir, metadata):
    md5, tmpdir = bad_metadata_dir
    with pytest.raises(ValueError):
        mod.get_meta(tmpdir, md5)
Esempio n. 3
0
def test_get_meta(metadata_dir, metadata):
    """ Load and parse metadata from md5-based dir stcture under base dir """
    md5, tmpdir = metadata_dir
    ret = mod.get_meta(tmpdir, md5)
    assert ret == metadata