- Timestamp:
- 17 May 2019, 15:13:53 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r15398 r15414 46 46 UPLOAD_CSV_TEMPLATE = ( 47 47 'matric_number,student_id,display_fullname,level,code,level_session,' 48 'score,ca \r\n'49 '234,E1000000,Anna Tester,100,COURSE1,2004,%s,%s \r\n')48 'score,ca,imported_ts\r\n' 49 '234,E1000000,Anna Tester,100,COURSE1,2004,%s,%s,%s\r\n') 50 50 51 51 class OfficerUITests(StudentsFullSetup): … … 371 371 self.browser.open(self.edit_scores_url) 372 372 upload_ctrl = self.browser.getControl(name='uploadfile:file') 373 upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22' ))373 upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22','77')) 374 374 upload_ctrl.add_file(upload_file, 'text/csv', 'myscores.csv') 375 375 self.browser.getControl("Update editable scores from").click() … … 379 379 self.assertEqual( 380 380 self.student['studycourse']['100']['COURSE1'].ca, 22) 381 self.assertEqual( 382 self.student['studycourse']['100']['COURSE1'].imported_ts, 77) 381 383 382 384 def test_scores_previous_session(self): … … 400 402 'matric_number,student_id,display_fullname,' 401 403 'depcode,faccode,level,code,level_session,ca,score,' 402 'total_score,grade \r\n234,E1000000,"TESTER, Anna",dep1,fac1,'403 '100,COURSE1,2003,,55,, \r\n')404 'total_score,grade,imported_ts\r\n234,E1000000,"TESTER, Anna",dep1,fac1,' 405 '100,COURSE1,2003,,55,,,\r\n') 404 406 self.browser.open(self.edit_prev_scores_url) 405 407 upload_ctrl = self.browser.getControl(name='uploadfile:file') 406 upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22' ))408 upload_file = StringIO(UPLOAD_CSV_TEMPLATE % ('65','22','77')) 407 409 upload_ctrl.add_file(upload_file, 'text/csv', 'myscores.csv') 408 410 self.browser.getControl("Update editable scores from").click() … … 412 414 self.assertEqual( 413 415 self.student['studycourse']['100']['COURSE1'].ca, 22) 416 self.assertEqual( 417 self.student['studycourse']['100']['COURSE1'].imported_ts, 77) 414 418 415 419 def test_lecturers_can_download_course_tickets(self): … … 1244 1248 self.browser.getControl(name="scores:list", index=0).value = 'abc' 1245 1249 self.browser.getControl("Update scores").click() 1246 self.assertTrue('Error: Score(s) and CA(s) of TESTER, Anna have not be updated.'1250 self.assertTrue('Error: Score(s), CA(s) and Imported TS(s) of TESTER, Anna have not be updated.' 1247 1251 in self.browser.contents) 1248 1252 # Scores can be removed.
Note: See TracChangeset for help on using the changeset viewer.