Пример #1
0
    def test_get_node_then_remove_index_tree(self):
        fake_tree = FakeTree(FakeNode.make_list(5))
        scheduler = SyncScheduler()
        scheduler.add_index_tree(fake_tree)

        assert scheduler.get_node()
        assert scheduler.get_node()
        scheduler.remove_index_tree(fake_tree)
        assert scheduler.get_node() is None
Пример #2
0
 def test_remove_index_tree_not_in_scheduler(self):
     fake_tree = object()
     scheduler = SyncScheduler()
     scheduler.remove_index_tree(fake_tree)