- Timestamp:
- 24 May 2013, 17:54:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r10210 r10226 297 297 return 298 298 299 # We have no local roles yet 300 #def test_local_roles_add_delete(self): 301 # # Managers can assign and delete local roles of applicants root 302 # myusers = self.app['users'] 303 # myusers.addUser('bob', 'bobssecret') 304 # self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 305 # self.browser.open(self.manage_root_path) 306 # self.browser.getControl(name="user").value = ['bob'] 307 # self.browser.getControl(name="local_role").value = [ 308 # 'waeup.local.ApplicationsOfficer'] 309 # self.browser.getControl("Add local role").click() 310 # self.assertTrue('<td>bob</td>' in self.browser.contents) 311 # # Remove the role assigned 312 # ctrl = self.browser.getControl(name='role_id') 313 # ctrl.getControl(value='bob|waeup.ApplicationsOfficer').selected = True 314 # self.browser.getControl("Remove selected local roles").click() 315 # self.assertTrue('Successfully removed:' in self.browser.contents) 316 # self.assertFalse('<td>bob</td>' in self.browser.contents) 317 # return 299 def test_local_roles_add_delete(self): 300 # Managers can assign and delete local roles of applicants root 301 myusers = self.app['users'] 302 myusers.addUser('bob', 'bobssecret') 303 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 304 self.browser.open('http://localhost/app/faculties/fac1/dep1/manage') 305 self.browser.getControl(name="user").value = ['bob'] 306 self.browser.getControl(name="local_role").value = [ 307 'waeup.local.ApplicationsManager'] 308 self.browser.getControl("Add local role").click() 309 self.assertTrue('<td>bob</td>' in self.browser.contents) 310 # Remove the role assigned 311 ctrl = self.browser.getControl(name='role_id') 312 ctrl.getControl( 313 value='bob|waeup.local.ApplicationsManager').selected = True 314 self.browser.getControl("Remove selected local roles").click() 315 self.assertTrue( 316 'Local role successfully removed: bob|waeup.local.ApplicationsManager' 317 in self.browser.contents) 318 self.assertFalse('<td>bob</td>' in self.browser.contents) 319 return 318 320 319 321 def test_add_delete_container(self):
Note: See TracChangeset for help on using the changeset viewer.