def test_node(): root = FlowRoot("test", "This is my flowroot") node = root.connect("a", lambda ctx: ctx['toto'] == 'titui') assert root.predicate_for_node(node)({'toto': 'titui'}) assert not root.predicate_for_node(node)({'toto': 'blah'})
def test_node(): root = FlowRoot("test", "This is my flowroot") node = root.connect("a", lambda ctx: ctx["toto"] == "titui") assert root.predicate_for_node(node)({"toto": "titui"}) assert not root.predicate_for_node(node)({"toto": "blah"})
def test_node(self): root = FlowRoot("test", "This is my flowroot") node = root.connect("a", lambda ctx: ctx['toto'] == 'titui') self.assertTrue(root.predicate_for_node(node)({'toto': 'titui'})) self.assertFalse(root.predicate_for_node(node)({'toto': 'blah'}))