Esempio n. 1
0
File: locations.py Progetto: 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, 'Modify user account "%s"' % user.username)
         templates.bullets(
             wfile,
             'Supplying a new password is optional.')
         templates.modify_user_form(wfile, self.path, user.name, user.email)
         templates.footer(wfile)
     else:
         self.redirect(Login.path, self.path)
Esempio n. 2
0
 def test_modify_user_form(self):
     """Check modify user form"""
     wfile = self.get_wfile()
     templates.modify_user_form(wfile, "a path", "a name", "an email")
     self.assert_(self.is_well_formed(wfile))