コード例 #1
0
ファイル: templates_test.py プロジェクト: p/midge
 def test_new_bug_form(self):
     """Check new bug form"""
     wfile = self.get_wfile()
     templates.new_bug_form(wfile,
                            "a path",
                            ["version1", "version2"],
                            ["category1", "category2"],
                            ["keyword1", "keyword2"])
     self.assert_(self.is_well_formed(wfile))
コード例 #2
0
ファイル: locations.py プロジェクト: p/midge
 def handle_get(self, session_id, values, wfile):
     user = self.application.get_user(session_id)
     if user:
         templates.header(wfile)
         templates.title(wfile, "Add new bug")
         templates.bullets(
             wfile,
             'Fill in as many fields as possible and '
             'press the "Submit" button.',
             'You must provide at least a title and a description.',
             'Use new values (e.g. for version) if <em>and only if</em> '
             'the available ones are unsuitable.')
         templates.new_bug_form(wfile, self.path,
                                self.application.versions,
                                self.application.categories,
                                self.application.keywords)
         templates.footer(wfile)
     else:
         self.redirect(Login.path, self.path)