def test_custom_lists(self):
from softwarecenter.ui.gtk3.panes.availablepane import get_test_window
win = get_test_window()
pane = win.get_data("pane")
self._p()
pane.on_search_terms_changed(None, "ark,artha,software-center")
self._p()
model = pane.app_view.tree_view.get_model()
# custom list should return three items
self.assertTrue(len(model) == 3)
# check package names, ordering is default "by relevance"
self.assertPkgInListAtIndex(0, model, "ark")
self.assertPkgInListAtIndex(1, model, "software-center")
self.assertPkgInListAtIndex(2, model, "artha")
# check that the status bar offers to install the packages
install_button = pane.action_bar.get_button(ActionButtons.INSTALL)
self.assertNotEqual(install_button, None)
GObject.timeout_add(TIMEOUT, lambda: win.destroy())
Gtk.main()
评论列表
文章目录