Changeset 6766


Ignore:
Timestamp:
14 Sep 2011, 09:40:46 (13 years ago)
Author:
Henrik Bettermann
Message:

Check if students remain logged in if they unsuccessfully tried to change the password.

File:
1 edited

Legend:

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

    r6763 r6766  
    236236        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    237237        self.assertEqual(self.browser.url, self.edit_clearance_student_path)
     238        self.browser.getControl(name="form.date_of_birth").value = '09/10/1961'
     239        self.browser.getControl("Save").click()
     240        self.assertMatches('...Form has been saved...',
     241                           self.browser.contents)
    238242
    239243        self.browser.open(self.student_path)
     
    244248        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    245249        self.assertEqual(self.browser.url, self.edit_personal_student_path)
     250        self.browser.getControl("Save").click()
     251        self.assertMatches('...Form has been saved...',
     252                           self.browser.contents)
    246253
    247254        self.browser.open(self.student_path)
     
    314321        # Change password
    315322        self.browser.getLink("Change password").click()
     323        self.browser.getControl(name="form.password").value = 'new_password'
     324        self.browser.getControl(
     325            name="form.password_repeat").value = 'new_passssword'
     326        self.browser.getControl("Save").click()
     327        self.assertTrue('passwords do not match' in self.browser.contents)
    316328        self.browser.getControl(name="form.password").value = 'new_password'
    317329        self.browser.getControl(
Note: See TracChangeset for help on using the changeset viewer.