Changeset 10347 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 22 Jun 2013, 17:01:32 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_browser.py
r10258 r10347 257 257 258 258 def test_export_accesscodes(self): 259 # Create portal manager and CCOfficer260 self.app['users'].addUser('mr manager', 'mrmanagersecret')261 self.app['users']['mr manager'].email = 'mrmanager@foo.ng'262 self.app['users']['mr manager'].title = 'Carlo Pitter'259 # Create portal manager and an ExportManager 260 self.app['users'].addUser('mrportal', 'mrportalsecret') 261 self.app['users']['mrportal'].email = 'mrportal@foo.ng' 262 self.app['users']['mrportal'].title = 'Carlo Pitter' 263 263 # Assign PortalManager role 264 264 prmlocal = IPrincipalRoleManager(self.app) 265 prmlocal.assignRoleToPrincipal('waeup.PortalManager', 'mr manager')266 self.app['users'].addUser('mr officer', 'mrofficersecret')267 self.app['users']['mr officer'].email = 'mrofficer@foo.ng'268 self.app['users']['mr officer'].title = 'Carlos Potter'269 # Assign CCOfficer role270 prmlocal.assignRoleToPrincipal('waeup. CCOfficer', 'mrofficer')265 prmlocal.assignRoleToPrincipal('waeup.PortalManager', 'mrportal') 266 self.app['users'].addUser('mrexporter', 'mrexportersecret') 267 self.app['users']['mrexporter'].email = 'mrexporter@foo.ng' 268 self.app['users']['mrexporter'].title = 'Carlos Potter' 269 # Assign ExportManager role 270 prmlocal.assignRoleToPrincipal('waeup.ExportManager', 'mrexporter') 271 271 272 272 # Login as portal manager 273 273 self.browser.open('http://localhost/app/login') 274 self.browser.getControl(name="form.login").value = 'mr manager'275 self.browser.getControl(name="form.password").value = 'mr managersecret'274 self.browser.getControl(name="form.login").value = 'mrportal' 275 self.browser.getControl(name="form.password").value = 'mrportalsecret' 276 276 self.browser.getControl("Login").click() 277 277 … … 299 299 # Login as officer who is not allowed to download accesscodes 300 300 self.browser.open('http://localhost/app/login') 301 self.browser.getControl(name="form.login").value = 'mr officer'302 self.browser.getControl(name="form.password").value = 'mr officersecret'301 self.browser.getControl(name="form.login").value = 'mrexporter' 302 self.browser.getControl(name="form.password").value = 'mrexportersecret' 303 303 self.browser.getControl("Login").click() 304 304 305 305 self.browser.open(self.datacenter_path + '/export') 306 # The CC Officer can see the accesscodebatches exporter ...306 # The Export Manager can see the accesscodebatches exporter ... 307 307 self.assertTrue( 308 308 '<option value="accesscodebatches">' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.