Example #1
0
def test_replace_all_paths_doesnt_change_nodes():
    nodes = ['nod1', 'nod2', 'nod3']
    db.replace_all_nodes(nodes)
    paths = [['nod1', 'edge1', 'nod2'], ['nod2', 'edge2', 'nod3']]
    db.replace_all_paths(paths)
    assert 3 == db.count_nodes()
    assert 2 == db.count_paths()
Example #2
0
def test_replace_all_paths_with_two_paths():
    paths = [['nod1', 'edge1', 'nod2'], ['nod2', 'edge2', 'nod3']]
    db.replace_all_paths(paths)
    assert 2 == db.count_paths()