Ignore:
Timestamp:
5 Oct 2012, 05:42:19 (12 years ago)
Author:
Henrik Bettermann
Message:

Set validated_by when bypassing course validation. Declare validated_by and bypass_validation in IStudentVerdictUpdate.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students/tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv

    r9293 r9296  
    88X111111,Fabian,Riester,7,1990-01-02,100006,aa@aa.ng,1234,m,courses validated
    99X222222,Thomas,Kinderman,8,1990-01-02,100007,aa@aa.ng,1234,m,courses validated
     10X333333,Paula,Schall,9,1990-01-02,100008,aa@aa.ng,1234,m,courses registered
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_studycourse_data.csv

    r9293 r9296  
    997,,CERT1,2008,200
    10108,,CERT1,2008,200
     119,,CERT1,2008,200
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_studylevel_data.csv

    r9293 r9296  
    10106,,2008,A,200
    11117,,2008,A,200
     129,,2008,A,200
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_verdict_data.csv

    r9293 r9296  
    1 matric_number,current_session,current_level,current_verdict,bypass_validation
    2 100000,2008,200,0,0
    3 100001,2008,100,B,False
    4 100002,2007,200,C,
    5 100003,2008,200,A,
    6 100004,2008,200,,
    7 100005,2008,200,A,1
    8 100006,2008,200,A,True
    9 100007,2008,200,A,True
     1matric_number,current_session,current_level,current_verdict,bypass_validation,validated_by
     2100000,2008,200,0,0,
     3100001,2008,100,B,False,
     4100002,2007,200,C,,
     5100003,2008,200,A,,
     6100004,2008,200,,,
     7100005,2008,200,A,1,
     8100006,2008,200,A,True,
     9100007,2008,200,A,True,
     10100008,2008,200,A,True,Juliana
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r9295 r9296  
    360360            self.csv_file, STUDENT_HEADER_FIELDS)
    361361        self.assertEqual(num_warns,0)
    362         self.assertEqual(len(self.app['students']), 9)
     362        self.assertEqual(len(self.app['students']), 10)
    363363        self.assertEqual(self.app['students']['X666666'].reg_number,'1')
    364364        self.assertEqual(
     
    980980        num, num_warns, fin_file, fail_file = self.processor.doImport(
    981981            self.csv_file, VERDICT_HEADER_FIELDS,'update')
    982         content = open(fail_file).read()
     982        #content = open(fail_file).read()
     983        #import pdb; pdb.set_trace()
    983984        self.assertEqual(num_warns,5)
    984985        self.assertEqual(studycourse.current_verdict, '0')
     
    994995        self.assertTrue(isinstance(
    995996            student['studycourse']['200'].validation_date, datetime.datetime))
     997        student = self.processor.getParent(
     998            dict(matric_number='100008'), self.app)
     999        self.assertEqual(student['studycourse']['200'].validated_by, 'Juliana')
    9961000        content = open(fail_file).read()
    9971001        self.assertEqual(
    9981002            content,
    999             'current_session,current_verdict,bypass_validation,'
    1000             'matric_number,current_level,--ERRORS--\r\n'
    1001             '2008,B,False,100001,100,Current level does not correspond.\r\n'
    1002             '2007,C,<IGNORE>,100002,200,Current session does not correspond.\r\n'
    1003             '2008,A,<IGNORE>,100003,200,Student in wrong state.\r\n'
    1004             '2008,<IGNORE>,<IGNORE>,100004,200,No verdict in import file.\r\n'
    1005             '2008,A,True,100007,200,Study level object is missing.\r\n'
     1003            'current_session,current_level,bypass_validation,current_verdict,'
     1004            'matric_number,validated_by,--ERRORS--\r\n'
     1005            '2008,100,False,B,100001,<IGNORE>,Current level does not correspond.\r\n'
     1006            '2007,200,<IGNORE>,C,100002,<IGNORE>,Current session does not correspond.\r\n'
     1007            '2008,200,<IGNORE>,A,100003,<IGNORE>,Student in wrong state.\r\n'
     1008            '2008,200,<IGNORE>,<IGNORE>,100004,<IGNORE>,No verdict in import file.\r\n'
     1009            '2008,200,True,A,100007,<IGNORE>,Study level object is missing.\r\n'
    10061010            )
    10071011        logcontent = open(self.logfile).read()
Note: See TracChangeset for help on using the changeset viewer.