Changeset 9296 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 5 Oct 2012, 05:42:19 (12 years ago)
- 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 8 8 X111111,Fabian,Riester,7,1990-01-02,100006,aa@aa.ng,1234,m,courses validated 9 9 X222222,Thomas,Kinderman,8,1990-01-02,100007,aa@aa.ng,1234,m,courses validated 10 X333333,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 9 9 7,,CERT1,2008,200 10 10 8,,CERT1,2008,200 11 9,,CERT1,2008,200 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_studylevel_data.csv
r9293 r9296 10 10 6,,2008,A,200 11 11 7,,2008,A,200 12 9,,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 1 matric_number,current_session,current_level,current_verdict,bypass_validation,validated_by 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, 10 100008,2008,200,A,True,Juliana -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r9295 r9296 360 360 self.csv_file, STUDENT_HEADER_FIELDS) 361 361 self.assertEqual(num_warns,0) 362 self.assertEqual(len(self.app['students']), 9)362 self.assertEqual(len(self.app['students']), 10) 363 363 self.assertEqual(self.app['students']['X666666'].reg_number,'1') 364 364 self.assertEqual( … … 980 980 num, num_warns, fin_file, fail_file = self.processor.doImport( 981 981 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() 983 984 self.assertEqual(num_warns,5) 984 985 self.assertEqual(studycourse.current_verdict, '0') … … 994 995 self.assertTrue(isinstance( 995 996 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') 996 1000 content = open(fail_file).read() 997 1001 self.assertEqual( 998 1002 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' 1006 1010 ) 1007 1011 logcontent = open(self.logfile).read()
Note: See TracChangeset for help on using the changeset viewer.