def test_replace_all_nodes_doesnt_change_templates(): templates = [['nod1', 'nod2'], ['nod2', 'nod3']] db.replace_all_templates(templates) nodes = ['nod1', 'nod2', 'nod3'] db.replace_all_nodes(nodes) assert 3 == db.count_nodes() assert 2 == db.count_templates()
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()
def test_replace_all_nodes_with_two_nodes(): nodes = ['nod1', 'nod2'] db.replace_all_nodes(nodes) assert 2 == db.count_nodes()
def test_replace_all_nodes_with_three_nodes(): nodes = ['nod1', 'nod2', 'nod3'] db.replace_all_nodes(nodes) assert 3 == db.count_nodes()