(self, expect_effect=True)
| 179 | self.assert_graph_eq() |
| 180 | |
| 181 | def test03_add_attribute_effect(self, expect_effect=True): |
| 182 | # test the introduction of an attribute by an effect |
| 183 | |
| 184 | # no leftovers from previous test |
| 185 | self.env.assertFalse(self.monitor_containt_effect()) |
| 186 | |
| 187 | # set a new attribute for each supported attribute type |
| 188 | q = """MATCH (n:L) WITH n |
| 189 | LIMIT 1 |
| 190 | SET |
| 191 | n.a = 1, |
| 192 | n.b = 'str', |
| 193 | n.c = True, |
| 194 | n.d = [1, [2], '3'] |
| 195 | """ |
| 196 | |
| 197 | res = self.query_master_and_wait(q) |
| 198 | self.env.assertEquals(res.properties_set, 4) |
| 199 | |
| 200 | if(expect_effect): |
| 201 | self.wait_for_effect() |
| 202 | else: |
| 203 | self.wait_for_query() |
| 204 | |
| 205 | q = """MATCH ()-[e]->() |
| 206 | WITH e |
| 207 | LIMIT 1 |
| 208 | SET |
| 209 | e.e = point({latitude: 51, longitude: 0}), |
| 210 | e.f=3.14, |
| 211 | e.empty_string = '' |
| 212 | """ |
| 213 | |
| 214 | res = self.query_master_and_wait(q) |
| 215 | self.env.assertEquals(res.properties_set, 3) |
| 216 | |
| 217 | if(expect_effect): |
| 218 | self.wait_for_effect() |
| 219 | else: |
| 220 | self.wait_for_query() |
| 221 | |
| 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 |
no test coverage detected