Skip to content

Commit 7376bd0

Browse files
committed
Fix graph remote graph projection in test setup
1 parent e37bca0 commit 7376bd0

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

graphdatascience/tests/integration/test_remote_util_ops.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
import pytest
44

55
from graphdatascience.graph.graph_object import Graph
6-
from graphdatascience.graph_data_science import GraphDataScience
76
from graphdatascience.server_version.server_version import ServerVersion
87
from graphdatascience.session.aura_graph_data_science import AuraGraphDataScience
98

109

1110
@pytest.fixture(autouse=True)
12-
def G(gds_with_cloud_setup: GraphDataScience) -> Generator[Graph, None, None]:
11+
def G(gds_with_cloud_setup: AuraGraphDataScience) -> Generator[Graph, None, None]:
1312
gds_with_cloud_setup.run_cypher(
1413
"""
1514
CREATE
@@ -32,8 +31,17 @@ def G(gds_with_cloud_setup: GraphDataScience) -> Generator[Graph, None, None]:
3231
)
3332
G, _ = gds_with_cloud_setup.graph.project(
3433
"g",
35-
{"Location": {"properties": "population"}},
36-
{"ROAD": {"properties": "cost"}},
34+
"""
35+
MATCH (n)-[r]->(m)
36+
RETURN gds.graph.project.remote(n, m, {
37+
sourceNodeLabels: labels(n),
38+
targetNodeLabels: labels(m),
39+
sourceNodeProperties: n {.population},
40+
targetNodeProperties: m {.population},
41+
relationshipType: type(r),
42+
relationshipProperties: properties(r)
43+
})
44+
""",
3745
)
3846

3947
yield G
@@ -63,7 +71,7 @@ def test_remote_util_as_nodes(gds_with_cloud_setup: AuraGraphDataScience) -> Non
6371

6472
@pytest.mark.cloud_architecture
6573
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
66-
def test_util_nodeProperty(gds_with_cloud_setup: GraphDataScience, G: Graph) -> None:
74+
def test_util_nodeProperty(gds_with_cloud_setup: AuraGraphDataScience, G: Graph) -> None:
6775
id = gds_with_cloud_setup.find_node_id(["Location"], {"name": "A"})
6876
result = gds_with_cloud_setup.util.nodeProperty(G, id, "population")
6977
assert result == 1337

0 commit comments

Comments
 (0)