Exemple #1
0
def test_get_unique_name(metavdirs):
    path = metavdirs
    vdirs = [vdir for vdir in get_all_vdirs(path)]
    names = list()
    for vdir in sorted(vdirs):
        names.append(get_unique_name(vdir, names))
    assert names == ['my private calendar', 'my calendar', 'public', 'home', 'public1', 'work']
Exemple #2
0
def test_discover(metavdirs):
    path = metavdirs
    vdirs = {vdir[len(path):] for vdir in get_all_vdirs(path)}
    assert vdirs == {
        '/cal1/public', '/cal1/private', '/cal2/public', '/dir/cal3/home',
        '/dir/cal3/public', '/dir/cal3/work'
    }
Exemple #3
0
def test_discover(metavdirs):
    path = metavdirs
    vdirs = {vdir[len(path):] for vdir in get_all_vdirs(path + '/*/*')}
    assert vdirs == {
        '/cal1/public', '/cal1/private', '/cal2/public', '/cal3/home',
        '/cal3/public', '/cal3/work', '/cal4/cfgcolor', '/cal4/dircolor'
    }
Exemple #4
0
def test_discover(metavdirs):
    path = metavdirs
    vdirs = {vdir[len(path):] for vdir in get_all_vdirs(path + '/*/*')}
    assert vdirs == {
        '/cal1/public', '/cal1/private', '/cal2/public',
        '/cal3/home', '/cal3/public', '/cal3/work',
        '/cal4/cfgcolor', '/cal4/dircolor', '/cal4/cfgcolor_again', '/cal4/cfgcolor_once_more'
    }
Exemple #5
0
def test_get_unique_name(metavdirs):
    path = metavdirs
    vdirs = [vdir for vdir in get_all_vdirs(path + '/*/*')]
    names = list()
    for vdir in sorted(vdirs):
        names.append(get_unique_name(vdir, names))
    assert names == [
        'my private calendar', 'my calendar', 'public', 'home', 'public1',
        'work', 'cfgcolor', 'cfgcolor_again', 'cfgcolor_once_more', 'dircolor',
    ]
Exemple #6
0
def test_get_unique_name(metavdirs):
    path = metavdirs
    vdirs = [vdir for vdir in get_all_vdirs(path + '/*/*')]
    names = list()
    for vdir in sorted(vdirs):
        names.append(get_unique_name(vdir, names))
    assert names == [
        'my private calendar', 'my calendar', 'public', 'home', 'public1',
        'work', 'cfgcolor', 'cfgcolor_again', 'cfgcolor_once_more', 'dircolor',
    ]