Changeset 10874 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 7 Jan 2014, 07:32:50 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 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( -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r10842 r10874 880 880 exporter.export([self.student], self.outfile) 881 881 result = open(self.outfile, 'rb').read() 882 self.assert Equal(882 self.assertTrue( 883 883 'student_id,matric_number,display_fullname,state,certcode,' 884 884 'faccode,depcode,is_postgrad,' … … 886 886 '%s\r\n' 887 887 'A111111,234,Anna M. Tester,created,CERT1,NA,NA,0,200,2012,ug_ft,' 888 ',,,,,,,,12.12,\r\n' % year_range_str, 889 result 888 % year_range_str in result 890 889 ) 891 890 return … … 906 905 exporter.export_all(self.app, self.outfile) 907 906 result = open(self.outfile, 'rb').read() 908 self.assert Equal(907 self.assertTrue( 909 908 'student_id,matric_number,display_fullname,state,' 910 909 'certcode,faccode,depcode,is_postgrad,' 911 910 'current_level,current_session,current_mode,' 912 911 '%s\r\nA111111,234,Anna M. Tester,created,CERT1,NA,NA,0,' 913 '200,2012,ug_ft,,,,,,13.13,,,12.12,\r\n' % year_range_str, 914 result 912 '200,2012,ug_ft' % year_range_str in result 915 913 ) 916 914 return
Note: See TracChangeset for help on using the changeset viewer.