Changeset 15287 for main/waeup.kofa/trunk/src/waeup/kofa/mandates
- Timestamp:
- 9 Jan 2019, 21:17:08 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py
r13990 r15287 34 34 from waeup.kofa.mandates.mandate import PasswordMandate, RefereeReportMandate 35 35 from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase) 36 from waeup.kofa.tests.test_authentication import SECRET 36 37 37 38 class MandatesContainerTestCase(FunctionalTestCase): … … 123 124 124 125 def test_set_officer_password(self): 125 self.app['users'].addUser('bob', 'bobssecret')126 self.app['users'].addUser('bob', SECRET) 126 127 officer = self.app['users']['bob'] 127 128 mandate = PasswordMandate() 128 129 mandate.params['user'] = officer 129 mandate.params['password'] = 'mypwd1'130 mandate.params['password'] = SECRET 130 131 self.app['mandates'].addMandate(mandate) 131 132 (msg, redirect_path) = mandate.execute() … … 134 135 'Password has been successfully set. Login with your new password.') 135 136 self.assertEqual(redirect_path, '/login') 136 self.assertTrue(IUserAccount(officer).checkPassword( 'mypwd1'))137 self.assertTrue(IUserAccount(officer).checkPassword(SECRET)) 137 138 logfile = os.path.join( 138 139 self.app['datacenter'].storage, 'logs', 'main.log')
Note: See TracChangeset for help on using the changeset viewer.