Exemple #1
0
def test_get_names(url):
    from leaf.page import get_names

    valid_paths = [
        url,
        os.path.join(url, 'index'),
        os.path.join('pages', url),
        os.path.join('pages', url, 'index'),
    ]

    return get_names(url) == valid_paths
Exemple #2
0
def test_get_names_admin(url):
    from leaf.page import get_names
    assert get_names(url) == []