- Timestamp:
- 14 Sep 2011, 00:57:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/uli-studentpw/src/waeup/sirp/students/tests/test_authentication.py
r6680 r6755 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
Note: See TracChangeset for help on using the changeset viewer.