Changeset 10874 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 7 Jan 2014, 07:32:50 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r10845 r10874 225 225 self.browser.open(self.root_path) 226 226 self.assertTrue( 227 '<a href="http://localhost/app/applicants/app2011">' 228 'This is the app2011 container</a>' in self.browser.contents) 229 self.app['applicants']['app2011'].hidden = True 227 '<a href="http://localhost/app/applicants/%s">' 228 'This is the %s container</a>' % (container_name_1, container_name_1) 229 in self.browser.contents) 230 self.app['applicants'][container_name_1].hidden = True 230 231 self.browser.open(self.root_path) 231 232 # Anonymous users can't see hidden containers 232 233 self.assertFalse( 233 '<a href="http://localhost/app/applicants/app2011">' 234 'This is the app2011 container</a>' in self.browser.contents) 234 '<a href="http://localhost/app/applicants/%s">' 235 'This is the %s container</a>' % (container_name_1, container_name_1) 236 in self.browser.contents) 235 237 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 236 238 self.browser.open(self.root_path) 237 239 self.assertTrue( 238 '<a href="http://localhost/app/applicants/app2011">' 239 'This is the app2011 container</a>' in self.browser.contents) 240 '<a href="http://localhost/app/applicants/%s">' 241 'This is the %s container</a>' % (container_name_1, container_name_1) 242 in self.browser.contents) 240 243 return 241 244 … … 339 342 self.browser.getControl("Add applicants container").click() 340 343 self.assertTrue('Added:' in self.browser.contents) 341 self.browser.getLink( "app2011").click()344 self.browser.getLink(container_name_1).click() 342 345 self.assertTrue('Manage applicants container' 343 346 in self.browser.contents) … … 402 405 self.assertTrue( 403 406 'zope.mgr - applicants.browser.ApplicantsContainerManageFormPage - ' 404 ' app2011 - saved: application_fee\n'in logcontent)407 '%s - saved: application_fee\n' % container_name_1 in logcontent) 405 408 self.browser.getControl("Remove selected", index=0).click() 406 409 self.assertTrue('No applicant selected' in self.browser.contents) … … 703 706 self.assertEqual(file_len, 31) 704 707 # When an applicant is removed, also the image is gone. 705 del self.app['applicants'][ 'app2011'][self.applicant.application_number]708 del self.app['applicants'][container_name_1][self.applicant.application_number] 706 709 fd = storage.getFile(file_id) 707 710 self.assertTrue(fd is None) … … 1238 1241 def test_applicants_in_container_export(self): 1239 1242 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1240 container_path = 'http://localhost/app/applicants/ app2011'1243 container_path = 'http://localhost/app/applicants/%s' % container_name_1 1241 1244 self.browser.open(container_path) 1242 1245 self.browser.getLink("Export applicants").click() … … 1265 1268 self.assertTrue( 1266 1269 'zope.mgr - applicants.browser.ExportJobContainerJobStart - ' 1267 'exported: applicants ( app2011), job_id=%s'1268 % job_idin logcontent1270 'exported: applicants (%s), job_id=%s' 1271 % (container_name_1, job_id) in logcontent 1269 1272 ) 1270 1273 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.