Exemplo n.º 1
0
def test_CursorDB_search_symlinks_with_find_similar(data) -> None:
    """Testing CursorDB search_symlinks method with ``find_similar`` argument."""
    db = CursorDB(data)
    value = db.search_symlinks("a", find_similar=True)
    assert value == []

    value = db.search_symlinks("fffaf", find_similar=True)
    assert value == ["ddddd"]

    value = db.search_symlinks("bb", find_similar=True)
    assert value == ["cc"]
Exemplo n.º 2
0
def test_CursorDB_search_symlinks_without_find_similar(data) -> None:
    """Testing CursorDB search_symlinks method without ``find_similar`` argument."""
    db = CursorDB(data)
    value = db.search_symlinks("a")
    assert value is None

    value = db.search_symlinks("aa")
    assert value == []

    value = db.search_symlinks("bb")
    assert value == ["cc"]