test_custom_lists.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:x-mario-center 作者: fossasia 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号