Changeset 7643 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 14 Feb 2012, 09:32:28 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py
r7626 r7643 156 156 """Update obj to the values given in row. 157 157 """ 158 # Remove student_id from row if empty 159 if row.has_key('student_id') and row['student_id'] is None: 160 row.pop('student_id') 158 161 for key, value in row.items(): 159 162 # Set student password and all fields declared in interface. … … 188 191 """Validates all values in row. 189 192 """ 193 iface = self.iface 190 194 if mode in ['update', 'remove']: 191 195 if self.getLocator(row) == 'reg_number': … … 193 197 elif self.getLocator(row) == 'matric_number': 194 198 iface = IStudentUpdateByMatricNo 195 else:196 iface = self.iface197 199 converter = IObjectConverter(iface) 198 200 errs, inv_errs, conv_dict = converter.fromStringDict( -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_student_data.csv
r7522 r7643 1 firstname,lastname,reg_number,date_of_birth,matric_number,email,phone2 Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,12343 Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,12344 Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,12341 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone 2 X666666,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234 3 ,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234 4 ,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234 -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_batching.py
r7623 r7643 201 201 self.assertEqual(num_warns,0) 202 202 assert len(self.app['students'].keys()) == 4 203 self.assertEqual(self.app['students']['X666666'].reg_number,'1') 203 204 shutil.rmtree(os.path.dirname(fin_file)) 204 205
Note: See TracChangeset for help on using the changeset viewer.