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

Method test08_set_labels_effect

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

Source from the content-addressed store, hash-verified

622 self.assert_graph_eq()
623
624 def test08_set_labels_effect(self, expect_effect=True):
625 # test the addition of a new node label by an effect
626
627 # no leftovers from previous test
628 self.env.assertFalse(self.monitor_containt_effect())
629
630 q = """MATCH (n:A:B) SET n:C"""
631 res = self.query_master_and_wait(q)
632 self.env.assertEquals(res.labels_added, 1)
633
634 if(expect_effect):
635 self.wait_for_effect()
636 else:
637 self.wait_for_query()
638
639 self.assert_graph_eq()
640
641 # test the addition of an existing and anew node label by an effect
642 q = """MATCH (n:A:B:C) SET n:C:D"""
643 res = self.query_master_and_wait(q)
644 self.env.assertEquals(res.labels_added, 1)
645
646 if(expect_effect):
647 self.wait_for_effect()
648 else:
649 self.wait_for_query()
650
651 self.assert_graph_eq()
652
653 def test09_remove_labels_effect(self, expect_effect=True):
654 # test the removal of a node label 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