Changeset 6756 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 14 Sep 2011, 01:26:25 (13 years ago)
- Location:
- main/waeup.sirp/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk
-
Property
svn:mergeinfo
set to
/main/waeup.sirp/branches/uli-studentpw merged eligible
-
Property
svn:mergeinfo
set to
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_authentication.py
r6680 r6756 27 27 from zope.password.interfaces import IPasswordManager 28 28 from zope.pluggableauth import PluggableAuthentication 29 from zope.security.interfaces import Unauthorized 29 30 from zope.securitypolicy.role import Role 30 31 from zope.securitypolicy.interfaces import IRole, Allow … … 33 34 from waeup.sirp.students.authentication import ( 34 35 StudentsAuthenticatorSetup, StudentAccount) 35 36 from waeup.sirp.students.tests.test_browser import StudentsFullSetup 37 from waeup.sirp.testing import FunctionalLayer 36 38 37 39 class StudentsAuthenticatorSetupTests(unittest.TestCase): … … 152 154 self.assertEqual(self.account.roles, ['waeup.test.Role']) 153 155 return 156 157 158 159 class FunctionalStudentAuthTests(StudentsFullSetup): 160 161 layer = FunctionalLayer 162 163 def setUp(self): 164 super(FunctionalStudentAuthTests, self).setUp() 165 return 166 167 def tearDown(self): 168 super(FunctionalStudentAuthTests, self).tearDown() 169 return 170 171 def test_reset_protected_anonymous(self): 172 # anonymous users cannot reset others passwords 173 self.assertRaises( 174 Unauthorized, 175 self.browser.open, self.student_path + '/bedit') 176 return -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6753 r6756 279 279 # Change password 280 280 self.browser.getLink("Change password").click() 281 self.browser.getControl(name="password").value = 'new_password' 282 self.browser.getControl(name="control_password").value = 'new_password' 281 self.browser.getControl(name="form.password").value = 'new_password' 282 self.browser.getControl( 283 name="form.password_repeat").value = 'new_password' 283 284 self.browser.getControl("Save").click() 284 285 self.assertTrue('Form has been saved' in self.browser.contents) … … 294 295 self.browser.open(self.login_path) 295 296 self.browser.getControl(name="form.login").value = self.test_student_id 296 self.browser.getControl(name=" password").value = 'new_password'297 self.browser.getControl(name="form.password").value = 'new_password' 297 298 self.browser.getControl("Login").click() 298 299 self.assertEqual(self.browser.url, self.student_path)
Note: See TracChangeset for help on using the changeset viewer.