@@ -136,15 +136,14 @@ def test_multiple_node_labels_or(runner: CollectingQueryRunner, gds: GraphDataSc
136
136
G , _ = gds .graph .cypher .project ("g" , nodes = ["A" , "B" ], combine_labels_with = "OR" )
137
137
138
138
assert G .name () == "g"
139
- assert runner .last_params () == dict (
140
- graph_name = "g" , data_config = {"sourceNodeLabels" : "labels(source)" , "targetNodeLabels" : "labels(target)" }
141
- )
139
+ assert runner .last_params () == dict (graph_name = "g" )
142
140
143
- assert (
144
- runner .last_query ()
145
- == """MATCH (source)-->(target)
141
+ assert runner .last_query () == (
142
+ """MATCH (source)-->(target)
146
143
WHERE (source:A OR source:B) AND (target:A OR target:B)
147
- RETURN gds.graph.project($graph_name, source, target, $data_config)"""
144
+ RETURN gds.graph.project($graph_name, source, target, {"""
145
+ "sourceNodeLabels: labels(source), "
146
+ "targetNodeLabels: labels(target)})"
148
147
)
149
148
150
149
@@ -153,17 +152,16 @@ def test_disconnected_nodes_multiple_node_labels_or(runner: CollectingQueryRunne
153
152
G , _ = gds .graph .cypher .project ("g" , nodes = ["A" , "B" ], combine_labels_with = "OR" , allow_disconnected_nodes = True )
154
153
155
154
assert G .name () == "g"
156
- assert runner .last_params () == dict (
157
- graph_name = "g" , data_config = {"sourceNodeLabels" : "labels(source)" , "targetNodeLabels" : "labels(target)" }
158
- )
155
+ assert runner .last_params () == dict (graph_name = "g" )
159
156
160
- assert (
161
- runner .last_query ()
162
- == """MATCH (source)
157
+ assert runner .last_query () == (
158
+ """MATCH (source)
163
159
WHERE source:A OR source:B
164
160
OPTIONAL MATCH (source)-->(target)
165
161
WHERE target:A OR target:B
166
- RETURN gds.graph.project($graph_name, source, target, $data_config)"""
162
+ RETURN gds.graph.project($graph_name, source, target, {"""
163
+ "sourceNodeLabels: labels(source), "
164
+ "targetNodeLabels: labels(target)})"
167
165
)
168
166
169
167
@@ -207,18 +205,14 @@ def test_multiple_multi_graph(runner: CollectingQueryRunner, gds: GraphDataScien
207
205
G , _ = gds .graph .cypher .project ("g" , nodes = ["A" , "B" ], relationships = ["REL1" , "REL2" ])
208
206
209
207
assert G .name () == "g"
210
- assert runner .last_params () == dict (
211
- graph_name = "g" ,
212
- data_config = {
213
- "sourceNodeLabels" : "labels(source)" ,
214
- "targetNodeLabels" : "labels(target)" ,
215
- "relationshipTypes" : "type(rel)" ,
216
- },
217
- )
208
+ assert runner .last_params () == dict (graph_name = "g" )
218
209
219
210
assert (
220
211
runner .last_query ()
221
212
== """MATCH (source)-[rel:REL1|REL2]->(target)
222
213
WHERE (source:A OR source:B) AND (target:A OR target:B)
223
- RETURN gds.graph.project($graph_name, source, target, $data_config)"""
214
+ RETURN gds.graph.project($graph_name, source, target, {"""
215
+ "sourceNodeLabels: labels(source), "
216
+ "targetNodeLabels: labels(target), "
217
+ "relationshipTypes: type(rel)})"
224
218
)
0 commit comments