Example #1
0
    def test_edit_bug_form(self):
        """Check edit bug form"""
        class MockComment:
            users_name = "my name"
            username = "******"
            date = mx.DateTime.now()
            text = "this is a comment"

        class MockBug:
            bug_id = 3
            status = "new"
            priority = "priority1"
            resolution = "resolution1"
            category = "category1"
            keyword = "keyword1"
            reported_in = "version2"
            fixed_in = "version2"
            tested_ok_in = "version2"
            comments = [MockComment(), MockComment()]

        wfile = self.get_wfile()
        wfile.write("<test>\n")
        templates.edit_bug_form(wfile,
                                "a path",
                                MockBug(),
                                ["status1", "status2"],
                                ["priority1", "priority2"],
                                ["resolution1", "resolution2"],
                                ["category1", "category2"],
                                ["keyword1", "keyword2"],
                                ["version1", "version2"])
        wfile.write("</test>")
        self.assert_(self.is_well_formed(wfile))
Example #2
0
File: locations.py Project: p/midge
 def _show_status_and_comments_and_form(self, wfile, bug):
     templates.bug_status_summary(wfile, bug)
     templates.vspace(wfile)
     templates.show_comments(wfile, bug)
     templates.hrule(wfile)
     templates.edit_bug_form(
         wfile, self.path, bug,
         self.application.statuses,
         self.application.priorities,
         self.application.resolutions,
         self.application.categories,
         self.application.keywords,
         self.application.versions)