Ignore:
Timestamp:
22 Nov 2012, 20:47:52 (12 years ago)
Author:
Henrik Bettermann
Message:

Customize LoginPage?. Yesterday Uniben requested a feature to display suspended_comment when a deactivated student logs in. Today they want to remove this feature again. I leave the feature in the base package but customize it here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r9691 r9709  
    666666        self.assertEqual(self.student.state, 'courses registered')
    667667        return
     668
     669    def test_login(self):
     670        # If suspended_comment is set this message will be flashed instead
     671        self.student.suspended_comment = u'Aetsch baetsch!'
     672        self.student.suspended = True
     673        self.browser.open(self.login_path)
     674        self.browser.getControl(name="form.login").value = self.student_id
     675        self.browser.getControl(name="form.password").value = 'spwd'
     676        self.browser.getControl("Login").click()
     677        # Uniben does not display suspended_comment
     678        self.assertMatches(
     679            '...<div class="alert-message warning">Your account has been deactivated.</div>...',
     680            self.browser.contents)
     681        self.student.suspended = False
Note: See TracChangeset for help on using the changeset viewer.