Changeset 13990 for main/waeup.kofa/trunk/src
- Timestamp:
- 25 Jun 2016, 05:00:54 (8 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/mandates
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/mandates/browser.py
r13989 r13990 49 49 50 50 def render(self): 51 self.flash(self.msg) 52 self.redirect(self.url(self.context, self.redirect_path)) 51 if self.msg: 52 self.flash(self.msg, type='warning') 53 self.redirect(self.url(self.context) + self.redirect_path) 53 54 return -
main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py
r13989 r13990 78 78 grok.getSite().logger.info( 79 79 'PasswordMandate used: %s ' % username) 80 redirect_path = ' login'80 redirect_path = '/login' 81 81 del self.__parent__[self.mandate_id] 82 82 return msg, redirect_path -
main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py
r13988 r13990 113 113 self.assertEqual(msg, 114 114 'Password has been successfully set. Login with your new password.') 115 self.assertEqual(redirect_path, ' login')115 self.assertEqual(redirect_path, '/login') 116 116 self.assertTrue(IUserAccount(student).checkPassword('mypwd1')) 117 117 # All mandates have been removed. … … 133 133 self.assertEqual(msg, 134 134 'Password has been successfully set. Login with your new password.') 135 self.assertEqual(redirect_path, ' login')135 self.assertEqual(redirect_path, '/login') 136 136 self.assertTrue(IUserAccount(officer).checkPassword('mypwd1')) 137 137 logfile = os.path.join( … … 151 151 self.assertEqual(msg, 152 152 'Password has been successfully set. Login with your new password.') 153 self.assertEqual(redirect_path, ' login')153 self.assertEqual(redirect_path, '/login') 154 154 self.assertTrue(IUserAccount(applicant).checkPassword('mypwd1')) 155 155 logfile = os.path.join( … … 213 213 % mandate.mandate_id) 214 214 self.assertTrue('No mandate' in self.browser.contents) 215 self.assertEqual(self.browser.url, 'http://localhost/app /')215 self.assertEqual(self.browser.url, 'http://localhost/app') 216 216 # Mandate id is needed 217 217 self.browser.open('http://localhost/app/mandate') 218 218 self.assertTrue('Misuse' in self.browser.contents) 219 self.assertEqual(self.browser.url, 'http://localhost/app /')219 self.assertEqual(self.browser.url, 'http://localhost/app') 220 220 221 221 def test_refereereport_mandate(self):
Note: See TracChangeset for help on using the changeset viewer.