class TRCMTreeView(TestCase):
    def setUp(self):
        self.c = RCMTreeView()
        _fill_view(self.c)

    def test_right_click(self):
        with visible(self.c):
            send_button_click(self.c, Gdk.BUTTON_SECONDARY)
            send_button_click(self.c, Gdk.BUTTON_SECONDARY, primary=True)

    def test_popup(self):
        menu = Gtk.Menu()
        selection = self.c.get_selection()
        selection.set_mode(Gtk.SelectionMode.MULTIPLE)

        with visible(self.c):
            # the popup only shows if the underlying row is selected,
            # so select all first
            selection.select_all()
            self.assertTrue(self.c.popup_menu(menu, Gdk.BUTTON_SECONDARY, 0))
class TRCMTreeView(TestCase):

    def setUp(self):
        self.c = RCMTreeView()
        _fill_view(self.c)

    def test_right_click(self):
        with visible(self.c):
            send_button_click(self.c, Gdk.BUTTON_SECONDARY)
            send_button_click(self.c, Gdk.BUTTON_SECONDARY, primary=True)

    def test_popup(self):
        menu = Gtk.Menu()
        selection = self.c.get_selection()
        selection.set_mode(Gtk.SelectionMode.MULTIPLE)

        with visible(self.c):
            # the popup only shows if the underlying row is selected,
            # so select all first
            selection.select_all()
            self.assertTrue(self.c.popup_menu(menu, Gdk.BUTTON_SECONDARY, 0))
 def setUp(self):
     self.c = RCMTreeView()
     _fill_view(self.c)
 def setUp(self):
     self.c = RCMTreeView()
     _fill_view(self.c)