Changeset 11984
- Timestamp:
- 18 Nov 2014, 09:55:33 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/mandates/tests.py
r11954 r11984 85 85 shutil.rmtree(self.dc_root) 86 86 87 def xx_test_set_student_password(self):88 student = createObject('waeup.Student')87 def test_set_customer_password(self): 88 customer = createObject('waeup.Customer') 89 89 # Add and execute a mandate with missing parameters. 90 90 mandate = PasswordMandate() … … 99 99 # Add and execute a perfect mandate 100 100 mandate = PasswordMandate() 101 mandate.params['user'] = student101 mandate.params['user'] = customer 102 102 mandate.params['password'] = 'mypwd1' 103 103 self.app['mandates'].addMandate(mandate) … … 105 105 # Password has been set. 106 106 self.assertEqual(msg, 'Password has been successfully set. Login with your new password.') 107 self.assertTrue(IUserAccount( student).checkPassword('mypwd1'))107 self.assertTrue(IUserAccount(customer).checkPassword('mypwd1')) 108 108 # All mandates have been removed. 109 109 self.assertEqual(len(self.app['mandates'].keys()), 0) … … 143 143 self.assertEqual([i for i in self.app['mandates'].keys()], [u'23456']) 144 144 145 def xx_test_browser(self):146 student = createObject('waeup.Student')147 self.app[' students'].addStudent(student)145 def test_browser(self): 146 customer = createObject('waeup.Customer') 147 self.app['customers'].addCustomer(customer) 148 148 mandate = PasswordMandate() 149 mandate.params['user'] = student149 mandate.params['user'] = customer 150 150 mandate.params['password'] = 'mypwd1' 151 151 self.app['mandates'].addMandate(mandate) … … 155 155 self.assertTrue('Password has been successfully set. Login with your new password.' 156 156 in self.browser.contents) 157 self.assertTrue(IUserAccount( student).checkPassword('mypwd1'))157 self.assertTrue(IUserAccount(customer).checkPassword('mypwd1')) 158 158 # All mandates have been removed. 159 159 self.assertEqual(len(self.app['mandates'].keys()), 0)
Note: See TracChangeset for help on using the changeset viewer.