Example #1
0
    def setUp(self):
        self.added_nodes = 0
        self.deleted_nodes = 0
        self.tree = MainTree()
        self.filtersbank = FiltersBank(self.tree)
        self.filtered_tree = FilteredTree(self.tree, self.filtersbank)
        self.tree.add_node(_Node(node_id="apple"))
        self.tree.add_node(_Node(node_id="google"))

        self.filtered_tree.set_callback('deleted', self.deleted)
        self.filtered_tree.set_callback('added', self.added)
Example #2
0
    def __init__(self):
        """ Initialize MainTree.

        @param root - the "root" node which contains all nodes
        """

        self.nodes = {}
        self.pending_relationships = []

        self.__cllbcks = {}

        self.root_id = 'root'
        self.root = _Node(self.root_id)
        _Node._set_tree(self.root,self)

        self._queue = processqueue.SyncQueue()
Example #3
0
    def __init__(self):
        """ Initialize MainTree.

        @param root - the "root" node which contains all nodes
        """

        self.nodes = {}
        self.pending_relationships = []

        self.__cllbcks = {}

        self.root_id = 'root'
        self.root = _Node(self.root_id)
        _Node._set_tree(self.root, self)

        self._queue = processqueue.SyncQueue()