Ignore:
Timestamp:
17 May 2019, 15:13:53 (5 years ago)
Author:
Henrik Bettermann
Message:

Enable lecturers to edit imported_ts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r15398 r15414  
    4646UPLOAD_CSV_TEMPLATE = (
    4747    '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')
    5050
    5151class OfficerUITests(StudentsFullSetup):
     
    371371        self.browser.open(self.edit_scores_url)
    372372        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'))
    374374        upload_ctrl.add_file(upload_file, 'text/csv', 'myscores.csv')
    375375        self.browser.getControl("Update editable scores from").click()
     
    379379        self.assertEqual(
    380380            self.student['studycourse']['100']['COURSE1'].ca, 22)
     381        self.assertEqual(
     382            self.student['studycourse']['100']['COURSE1'].imported_ts, 77)
    381383
    382384    def test_scores_previous_session(self):
     
    400402            'matric_number,student_id,display_fullname,'
    401403            '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')
    404406        self.browser.open(self.edit_prev_scores_url)
    405407        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'))
    407409        upload_ctrl.add_file(upload_file, 'text/csv', 'myscores.csv')
    408410        self.browser.getControl("Update editable scores from").click()
     
    412414        self.assertEqual(
    413415            self.student['studycourse']['100']['COURSE1'].ca, 22)
     416        self.assertEqual(
     417            self.student['studycourse']['100']['COURSE1'].imported_ts, 77)
    414418
    415419    def test_lecturers_can_download_course_tickets(self):
     
    12441248        self.browser.getControl(name="scores:list", index=0).value = 'abc'
    12451249        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.'
    12471251            in self.browser.contents)
    12481252        # Scores can be removed.
Note: See TracChangeset for help on using the changeset viewer.