(self, expect_effect=True)
| 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 |
| 272 | |
| 273 | # no leftovers from previous test |
| 274 | self.env.assertFalse(self.monitor_containt_effect()) |
| 275 | |
| 276 | # edge without attributes |
| 277 | q1 = """CREATE ()-[:R]->()""" |
| 278 | |
| 279 | # edge with attributes |
| 280 | q2 = """CREATE ()-[:CONNECT { |
| 281 | ei:1, |
| 282 | s:'str', |
| 283 | eb:True, |
| 284 | a:[1, [2], '3'], |
| 285 | ep:point({latitude: 51, longitude: 0}), |
| 286 | f:3.14, |
| 287 | empty_string: ''} |
| 288 | ]->()""" |
| 289 | |
| 290 | # edge between an existing node and a new node |
| 291 | q3 = """MATCH (a) WITH a LIMIT 1 CREATE (a)-[:R]->()""" |
| 292 | |
| 293 | # edge between two existing nodes |
| 294 | q4 = """MATCH (a), (b) WITH a, b LIMIT 1 CREATE (a)-[:R]->(b)""" |
| 295 | |
| 296 | queries = [q1, q2, q3, q4] |
| 297 | for q in queries: |
| 298 | res = self.query_master_and_wait(q) |
| 299 | self.env.assertEquals(res.relationships_created, 1) |
| 300 | |
| 301 | if(expect_effect): |
| 302 | self.wait_for_effect() |
| 303 | else: |
| 304 | self.wait_for_query() |
| 305 | |
| 306 | self.assert_graph_eq() |
| 307 | |
| 308 | def test06_update_node_effect(self, expect_effect=True): |
| 309 | # test an entity attribute set update by an effect |
no test coverage detected