Skip to content

Commit f89882f

Browse files
committed
Assert against actual neo4j node ids
1 parent 5baed47 commit f89882f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graphdatascience/tests/integration/test_graph_ops.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,9 +549,11 @@ def test_graph_relationships_stream_with_arrow(gds: GraphDataScience) -> None:
549549

550550
result = gds.beta.graph.relationships.stream(G, ["REL"])
551551

552+
expected = gds.run_cypher("MATCH (n)-[REL]->(m) RETURN id(n) AS src_id, id(m) AS trg_id")
553+
552554
assert list(result.keys()) == ["sourceNodeId", "targetNodeId", "relationshipType"]
553-
assert {e for e in result["sourceNodeId"]} == {0, 1}
554-
assert {e for e in result["targetNodeId"]} == {1, 2}
555+
assert {e for e in result["sourceNodeId"]} == {i for i in expected["src_id"]}
556+
assert {e for e in result["targetNodeId"]} == {i for i in expected["trg_id"]}
555557

556558

557559
def test_graph_writeNodeProperties(gds: GraphDataScience) -> None:

0 commit comments

Comments
 (0)