Changeset 9705
- Timestamp:
- 21 Nov 2012, 20:54:11 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r9701 r9705 259 259 return 260 260 # Now we know that the student is suspended. 261 self.flash(_('Your account has been deactivated.')) 261 comment = getattr(student, 'suspended_comment', None) 262 if comment: 263 self.flash(comment) 264 else: 265 self.flash(_('Your account has been deactivated.')) 262 266 return 263 267 self.flash(_('You entered invalid credentials.')) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9690 r9705 1790 1790 self.browser.getControl("Login").click() 1791 1791 self.assertMatches( 1792 '...Your account has been deactivated...', self.browser.contents) 1792 '...<div class="alert-message warning">' 1793 'Your account has been deactivated.</div>...', self.browser.contents) 1794 # If suspended_comment is set this message will be flashed instead 1795 self.student.suspended_comment = u'Aetsch baetsch!' 1796 self.browser.getControl(name="form.login").value = self.student_id 1797 self.browser.getControl(name="form.password").value = 'spwd' 1798 self.browser.getControl("Login").click() 1799 self.assertMatches( 1800 '...<div class="alert-message warning">Aetsch baetsch!</div>...', 1801 self.browser.contents) 1793 1802 self.student.suspended = False 1794 1803 # Students can't login if a temporary password has been set and
Note: See TracChangeset for help on using the changeset viewer.