(self, expect_effect=True)
| 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 |
no test coverage detected