def test_get_children_count(trans, cur, root): node = Node(trans, root) assert len(node) == core.get_children_count(cur, root.id)
def __len__(self): """ Return amount of child nodes. """ return int(core.get_children_count(self._cursor, self.id))
def has_children(self): """ Return whether immediate children exist. """ return core.get_children_count(self._cursor, self.id) > 0