Esempio n. 1
0
    def test_should_display_last_build_label_on_demand(self):
        project = Project('url', None, 'None', {
            'name': 'proj1',
            'lastBuildStatus': 'Success',
            'activity': 'Sleeping',
            'url': '1.2.3.4:8080/cc.xml',
            'lastBuildLabel': 'master',
            'lastBuildTime': '2009-05-29T13:54:07'
        })

        self.assertEqual('proj1', project.label())
        self.assertEqual('proj1 (master)', project.label(True))
Esempio n. 2
0
    def create_menu_item(self, project: Project, icon: QIcon):
        menu_item_label = project.label(self.conf.get_show_last_build_label())
        if self.conf.get_value("lastBuildTimeForProject"):
            menu_item_label = menu_item_label + ", " + DistanceOfTime(
                project.get_last_build_time()).age() + " ago"

        action = self.menu.addAction(icon, menu_item_label)
        action.setIconVisibleInMenu(True)
        action.triggered.connect(partial(self.open_url, url=project.url))