class TDragIconTreeView(TestCase): def setUp(self): self.c = DragIconTreeView() _fill_view(self.c) def test_create_drag_icon(self): model = self.c.get_model() all_paths = [row.path for row in model] self.assertFalse(self.c.create_multi_row_drag_icon(all_paths, 1)) with visible(self.c): self.assertTrue(self.c.create_multi_row_drag_icon(all_paths, 1)) self.assertFalse(self.c.create_multi_row_drag_icon([], 1)) self.assertTrue( self.c.create_multi_row_drag_icon([all_paths[0]], 10))