Ignore:
Timestamp:
19 Nov 2011, 17:26:18 (13 years ago)
Author:
Henrik Bettermann
Message:

Simplify change password algorithm. No interface IStudentPasswordSetting needed, no adapter StudentPasswordSetting? needed.

I have to think about using a global utility instead of the validatePassword function in utils.py. Therefore validatePassword is not yet used by the PasswordChangeCredentialsPlugin?.

File:
1 edited

Legend:

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

    r7143 r7144  
    653653        # Change password
    654654        self.browser.getLink("Change password").click()
    655         self.browser.getControl(name="form.password").value = 'pw'
    656         self.browser.getControl(
    657             name="form.password_repeat").value = 'pw'
     655        self.browser.getControl(name="change_password").value = 'pw'
     656        self.browser.getControl(
     657            name="change_password_repeat").value = 'pw'
    658658        self.browser.getControl("Save").click()
    659659        self.assertTrue('Value is too short' in self.browser.contents)
    660         self.browser.getControl(name="form.password").value = 'new_password'
    661         self.browser.getControl(
    662             name="form.password_repeat").value = 'new_passssword'
    663         self.browser.getControl("Save").click()
    664         self.assertTrue('passwords do not match' in self.browser.contents)
    665         self.browser.getControl(name="form.password").value = 'new_password'
    666         self.browser.getControl(
    667             name="form.password_repeat").value = 'new_password'
    668         self.browser.getControl("Save").click()
    669         self.assertTrue('Password has been set' in self.browser.contents)
     660        self.browser.getControl(name="change_password").value = 'new_password'
     661        self.browser.getControl(
     662            name="change_password_repeat").value = 'new_passssword'
     663        self.browser.getControl("Save").click()
     664        self.assertTrue('Passwords do not match' in self.browser.contents)
     665        self.browser.getControl(name="change_password").value = 'new_password'
     666        self.browser.getControl(
     667            name="change_password_repeat").value = 'new_password'
     668        self.browser.getControl("Save").click()
     669        self.assertTrue('Password changed' in self.browser.contents)
    670670        # We are still logged in. Changing the password hasn't thrown us out.
    671671        self.browser.getLink("My Data").click()
Note: See TracChangeset for help on using the changeset viewer.