Exemplo n.º 1
0
def test_create_nodes_from_property_dicts(graph):
    graph.delete_all()
    with graph.begin() as tx:
        create_nodes(tx, DATA_DICTS, labels={"Person", "Employee"})
    matched = graph.nodes.match("Person")
    assert matched.count() == 4
    assert all(node.labels == {"Person", "Employee"} for node in matched)
Exemplo n.º 2
0
def test_create_nodes_from_property_lists(graph):
    graph.delete_all()
    with graph.begin() as tx:
        list(
            create_nodes(tx,
                         DATA_LISTS,
                         labels={"Person", "Employee"},
                         keys=HEADERS))
    matched = graph.nodes.match("Person")
    assert matched.count() == 4
    assert all(node.labels == {"Person", "Employee"} for node in matched)