Changeset 9161 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 6 Sep 2012, 07:43:51 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9148 r9161 967 967 self.app['users'].addUser('mrsadvise', 'mrsadvisesecret') 968 968 self.app['users']['mrsadvise'].email = 'mradvise@foo.ng' 969 self.app['users']['mrsadvise'].title = 'Helen Procter'969 self.app['users']['mrsadvise'].title = u'Helen Procter' 970 970 # Assign local CourseAdviser100 role for a certificate 971 971 cert = self.app['faculties']['fac1']['dep1'].certificates['CERT1'] … … 1018 1018 # the 100L CA does see the 'Validate' button 1019 1019 self.browser.open(L110_student_path) 1020 self.assertFalse('Validate ' in self.browser.contents)1020 self.assertFalse('Validate courses' in self.browser.contents) 1021 1021 IWorkflowInfo(self.student).fireTransition('register_courses') 1022 1022 self.browser.open(L110_student_path) 1023 self.assertFalse('Validate ' in self.browser.contents)1023 self.assertFalse('Validate courses' in self.browser.contents) 1024 1024 self.student['studycourse'].current_level = 110 1025 1025 self.browser.open(L110_student_path) 1026 self.assertTrue('Validate ' in self.browser.contents)1026 self.assertTrue('Validate courses' in self.browser.contents) 1027 1027 # ... but a 100L CA does not see the button on other levels 1028 1028 studylevel2 = StudentStudyLevel() … … 1032 1032 L200_student_path = self.studycourse_path + '/200' 1033 1033 self.browser.open(L200_student_path) 1034 self.assertFalse('Validate ' in self.browser.contents)1034 self.assertFalse('Validate courses' in self.browser.contents) 1035 1035 self.browser.open(L110_student_path) 1036 1036 self.browser.getLink("Validate courses").click() 1037 1037 self.assertTrue('Course list has been validated' in self.browser.contents) 1038 1038 self.assertTrue('courses validated' in self.browser.contents) 1039 self.assertEqual(self.student['studycourse']['110'].validated_by, 1040 'Helen Procter') 1041 self.assertMatches( 1042 '<YYYY-MM-DD hh:mm:ss>', 1043 self.student['studycourse']['110'].validation_date.strftime( 1044 "%Y-%m-%d %H:%M:%S")) 1039 1045 self.browser.getLink("Reject courses").click() 1040 1046 self.assertTrue('Course list request has been annulled.' … … 1044 1050 '/contactstudent?subject=%s' % urlmessage) 1045 1051 self.assertTrue('school fee paid' in self.browser.contents) 1052 self.assertTrue(self.student['studycourse']['110'].validated_by is None) 1053 self.assertTrue(self.student['studycourse']['110'].validation_date is None) 1046 1054 IWorkflowInfo(self.student).fireTransition('register_courses') 1047 1055 self.browser.open(L110_student_path) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r9148 r9161 209 209 self.assertEqual( 210 210 result, 211 'level,level_session,level_verdict,student_id\r\n' 212 ',,0,\r\n' 211 'level,level_session,level_verdict,validated_by,validation_date,' 212 'student_id\r\n' 213 ',,0,,,\r\n' 213 214 ) 214 215 return … … 225 226 self.assertEqual( 226 227 result, 227 'level,level_session,level_verdict,student_id\r\n' 228 '100,2012,A,A111111\r\n' 228 'level,level_session,level_verdict,validated_by,validation_date,' 229 'student_id\r\n' 230 '100,2012,A,,,A111111\r\n' 229 231 ) 230 232 return … … 239 241 self.assertEqual( 240 242 result, 241 'level,level_session,level_verdict,student_id\r\n' 242 '100,2012,A,A111111\r\n' 243 'level,level_session,level_verdict,validated_by,validation_date,' 244 'student_id\r\n' 245 '100,2012,A,,,A111111\r\n' 243 246 ) 244 247 return … … 252 255 self.assertEqual( 253 256 result, 254 'level,level_session,level_verdict,student_id\r\n' 255 '100,2012,A,A111111\r\n' 257 'level,level_session,level_verdict,validated_by,validation_date,' 258 'student_id\r\n' 259 '100,2012,A,,,A111111\r\n' 256 260 ) 257 261 return
Note: See TracChangeset for help on using the changeset viewer.