Esempio n. 1
0
def test_convert_bad_path_to_id():
    """ For a wrong path, id should be empty string """
    path = 'foo/bar/baz'
    assert mod.to_md5(path) == ''
Esempio n. 2
0
def test_convert_to_id():
    """ For given path, convert to proper MD5 hash """
    path = '202/ab6/2b5/51f/6d7/fc0/02f/656/525/255/44'.replace('/', os.sep)
    md5 = '202ab62b551f6d7fc002f65652525544'
    assert mod.to_md5(path) == md5