MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / test04_create_node_effect

Method test04_create_node_effect

tests/flow/test_effects.py:224–268  ·  view source on GitHub ↗
(self, expect_effect=True)

Source from the content-addressed store, hash-verified

222 self.assert_graph_eq()
223
224 def test04_create_node_effect(self, expect_effect=True):
225 # test the introduction of a new node by an effect
226
227 # no leftovers from previous test
228 self.env.assertFalse(self.monitor_containt_effect())
229
230 # empty node
231 q0 = """CREATE ()"""
232
233 # label-less node with attributes
234 q1 = """CREATE ({
235 i:1,
236 s:'str',
237 b:True,
238 a:[1, [2], '3'],
239 p:point({latitude: 51, longitude: 0}),
240 f:3.14,
241 empty_string: ''
242 })"""
243
244 # labeled node without attributes
245 q2 = """CREATE (:L)"""
246
247 # node with multiple labels and attributes
248 q3 = """CREATE (:A:B {
249 i:1,
250 s:'str',
251 b:True,
252 a:[1, [2], '3'],
253 p:point({latitude: 51, longitude: 0}),
254 f:3.14,
255 empty_string: ''
256 })"""
257
258 queries = [q0, q1, q2, q3]
259 for q in queries:
260 res = self.query_master_and_wait(q)
261 self.env.assertEquals(res.nodes_created, 1)
262
263 if(expect_effect):
264 self.wait_for_effect()
265 else:
266 self.wait_for_query()
267
268 self.assert_graph_eq()
269
270 def test05_create_edge_effect(self, expect_effect=True):
271 # tests the introduction of a new edge by an effect

Callers 1

Calls 5

query_master_and_waitMethod · 0.95
wait_for_effectMethod · 0.95
wait_for_queryMethod · 0.95
assert_graph_eqMethod · 0.95

Tested by

no test coverage detected