Changeset 7952
- Timestamp:
- 22 Mar 2012, 07:46:43 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r7951 r7952 681 681 for key, value in row.items(): 682 682 # Skip fields not declared in interface plus 683 # current_ verdictand current_level683 # current_session and current_level 684 684 if hasattr(obj, key) and not key in [ 685 'current_ verdict','current_level']:685 'current_session','current_level']: 686 686 setattr(obj, key, value) 687 687 items_changed += '%s=%s, ' % (key,value) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_student_data.csv
r7951 r7952 3 3 ,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,courses validated 4 4 ,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,courses validated 5 ,Else,Mueller,4,1990-01-05,100003,aa@aa.ng,1234,courses registered -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_verdict_data.csv
r7951 r7952 1 1 matric_number,current_session,current_level,current_verdict 2 2 100000,2008,200,A 3 100001,2008,200,B 4 100002,2008,200,C 3 100001,2008,100,B 4 100002,2007,200,C 5 100003,2008,200,A -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r7951 r7952 241 241 self.csv_file, STUDENT_HEADER_FIELDS) 242 242 self.assertEqual(num_warns,0) 243 assert len(self.app['students'].keys()) == 4243 assert len(self.app['students'].keys()) == 5 244 244 self.assertEqual(self.app['students']['X666666'].reg_number,'1') 245 245 shutil.rmtree(os.path.dirname(fin_file)) … … 383 383 num, num_warns, fin_file, fail_file = self.processor.doImport( 384 384 self.csv_file, VERDICT_HEADER_FIELDS,'update') 385 self.assertEqual(num_warns,0) 386 studycourse = self.processor.getEntry(dict(reg_number='1'), self.app) 387 self.assertEqual(studycourse.certificate.code, u'CERT1') 385 self.assertEqual(num_warns,3) 386 studycourse = self.processor.getEntry(dict(matric_number='100000'), self.app) 387 student = self.processor.getParent(dict(matric_number='100000'), self.app) 388 self.assertEqual(studycourse.current_verdict, 'A') 389 self.assertEqual(student.state, 'returning') 388 390 shutil.rmtree(os.path.dirname(fin_file)) 389 391
Note: See TracChangeset for help on using the changeset viewer.