def test_get_child_contexts(self): root = Context('root') child = root.get_or_create_context('child1') self.assert_(child.get_parent() is root) self.assert_(child in root.get_child_contexts())