@@ -136,15 +136,14 @@ def test_multiple_node_labels_or(runner: CollectingQueryRunner, gds: GraphDataSc
136136 G , _ = gds .graph .cypher .project ("g" , nodes = ["A" , "B" ], combine_labels_with = "OR" )
137137
138138 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" )
142140
143- assert (
144- runner .last_query ()
145- == """MATCH (source)-->(target)
141+ assert runner .last_query () == (
142+ """MATCH (source)-->(target)
146143WHERE (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)})"
148147 )
149148
150149
@@ -153,17 +152,16 @@ def test_disconnected_nodes_multiple_node_labels_or(runner: CollectingQueryRunne
153152 G , _ = gds .graph .cypher .project ("g" , nodes = ["A" , "B" ], combine_labels_with = "OR" , allow_disconnected_nodes = True )
154153
155154 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" )
159156
160- assert (
161- runner .last_query ()
162- == """MATCH (source)
157+ assert runner .last_query () == (
158+ """MATCH (source)
163159WHERE source:A OR source:B
164160OPTIONAL MATCH (source)-->(target)
165161WHERE 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)})"
167165 )
168166
169167
@@ -207,18 +205,14 @@ def test_multiple_multi_graph(runner: CollectingQueryRunner, gds: GraphDataScien
207205 G , _ = gds .graph .cypher .project ("g" , nodes = ["A" , "B" ], relationships = ["REL1" , "REL2" ])
208206
209207 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" )
218209
219210 assert (
220211 runner .last_query ()
221212 == """MATCH (source)-[rel:REL1|REL2]->(target)
222213WHERE (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)})"
224218 )
0 commit comments