Changeset 8494 for main/waeup.kofa/trunk
- Timestamp:
- 23 May 2012, 06:36:40 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r8338 r8494 42 42 43 43 def getStudent(self): 44 return self.__parent__.__parent__44 return getattr(getattr(self, '__parent__', None), '__parent__', None) 45 45 46 46 @property -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r8429 r8494 41 41 exporter.export([self.student], self.outfile) 42 42 result = open(self.outfile, 'rb').read() 43 self.assertEqual( 44 result, 43 self.assertTrue( 45 44 'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,' 46 45 'firstname,lastname,matric_number,middlename,nationality,' 47 'perm_address,phone,reg_number,sex,student_id\r\n' 48 49 'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,Anna,' 50 'Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",' 51 '+234-123-12345,123456,f,A111111\r\n' 46 'perm_address,phone,reg_number,sex,student_id,password,' 47 'state,history,certcode\r\n' 48 49 'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,' 50 'Anna,Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",' 51 '+234-123-12345,123456,f,A111111,,created' 52 in result 52 53 ) 53 54 return … … 60 61 exporter.export_all(self.app, self.outfile) 61 62 result = open(self.outfile, 'rb').read() 62 self.assertEqual( 63 result, 63 self.assertTrue( 64 64 'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,' 65 65 'firstname,lastname,matric_number,middlename,nationality,' 66 'perm_address,phone,reg_number,sex,student_id\r\n' 67 68 'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,Anna,' 69 'Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",' 70 '+234-123-12345,123456,f,A111111\r\n' 66 'perm_address,phone,reg_number,sex,student_id,password,' 67 'state,history,certcode\r\n' 68 69 'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,' 70 'Anna,Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",' 71 '+234-123-12345,123456,f,A111111,,created' 72 in result 71 73 ) 72 74 return … … 78 80 exporter.export_student(self.student, self.outfile) 79 81 result = open(self.outfile, 'rb').read() 80 self.assertEqual( 81 result, 82 self.assertTrue( 82 83 'adm_code,clearance_locked,clr_code,date_of_birth,email,employer,' 83 84 'firstname,lastname,matric_number,middlename,nationality,' 84 'perm_address,phone,reg_number,sex,student_id\r\n' 85 86 'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,Anna,' 87 'Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",' 88 '+234-123-12345,123456,f,A111111\r\n' 85 'perm_address,phone,reg_number,sex,student_id,password,' 86 'state,history,certcode\r\n' 87 88 'my adm code,0,my clr code,1981-02-04#,anna@sample.com,,' 89 'Anna,Tester,M123456,M.,NG,"Studentroad 21\nLagos 123456\n",' 90 '+234-123-12345,123456,f,A111111,,created' 91 in result 89 92 ) 90 93 return … … 122 125 result, 123 126 'certificate,current_level,current_session,current_verdict,' 124 'entry_mode,entry_session,previous_verdict \r\n'125 126 ',,,0,,,0 \r\n'127 'entry_mode,entry_session,previous_verdict,student_id\r\n' 128 129 ',,,0,,,0,\r\n' 127 130 ) 128 131 return … … 139 142 result, 140 143 'certificate,current_level,current_session,current_verdict,' 141 'entry_mode,entry_session,previous_verdict \r\n'142 143 'CERT1,200,2012,0,ug_ft,2010,0 \r\n'144 'entry_mode,entry_session,previous_verdict,student_id\r\n' 145 146 'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n' 144 147 ) 145 148 return … … 155 158 result, 156 159 'certificate,current_level,current_session,current_verdict,' 157 'entry_mode,entry_session,previous_verdict \r\n'158 159 'CERT1,200,2012,0,ug_ft,2010,0 \r\n'160 'entry_mode,entry_session,previous_verdict,student_id\r\n' 161 162 'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n' 160 163 ) 161 164 return … … 170 173 result, 171 174 'certificate,current_level,current_session,current_verdict,' 172 'entry_mode,entry_session,previous_verdict \r\n'173 174 'CERT1,200,2012,0,ug_ft,2010,0 \r\n'175 'entry_mode,entry_session,previous_verdict,student_id\r\n' 176 177 'CERT1,200,2012,0,ug_ft,2010,0,A111111\r\n' 175 178 ) 176 179 return … … 206 209 self.assertEqual( 207 210 result, 208 'level,level_session,level_verdict, matric_number,reg_number\r\n'209 ',,0, ,\r\n'211 'level,level_session,level_verdict,student_id\r\n' 212 ',,0,\r\n' 210 213 ) 211 214 return … … 222 225 self.assertEqual( 223 226 result, 224 'level,level_session,level_verdict, matric_number,reg_number\r\n'225 '100,2012,A, M123456,123456\r\n'227 'level,level_session,level_verdict,student_id\r\n' 228 '100,2012,A,A111111\r\n' 226 229 ) 227 230 return … … 236 239 self.assertEqual( 237 240 result, 238 'level,level_session,level_verdict, matric_number,reg_number\r\n'239 '100,2012,A, M123456,123456\r\n'241 'level,level_session,level_verdict,student_id\r\n' 242 '100,2012,A,A111111\r\n' 240 243 ) 241 244 return … … 249 252 self.assertEqual( 250 253 result, 251 'level,level_session,level_verdict, matric_number,reg_number\r\n'252 '100,2012,A, M123456,123456\r\n'254 'level,level_session,level_verdict,student_id\r\n' 255 '100,2012,A,A111111\r\n' 253 256 ) 254 257 return … … 285 288 result, 286 289 'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,' 287 ' matric_number,passmark,reg_number,score,semester,title\r\n'288 '0,0,,,,,,0,, ,,0,,\r\n'290 'passmark,score,semester,title,student_id\r\n' 291 '0,0,,,,,,0,,0,,,\r\n' 289 292 ) 290 293 return … … 303 306 result, 304 307 'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,' 305 ' matric_number,passmark,reg_number,score,semester,title\r\n'306 '1,1,CRS1,100,DEP1,FAC1,100,0, M123456,100,123456,0,2,Course1\r\n'308 'passmark,score,semester,title,student_id\r\n' 309 '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111\r\n' 307 310 ) 308 311 return … … 318 321 result, 319 322 'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,' 320 ' matric_number,passmark,reg_number,score,semester,title\r\n'321 '1,1,CRS1,100,DEP1,FAC1,100,0, M123456,100,123456,0,2,Course1\r\n'323 'passmark,score,semester,title,student_id\r\n' 324 '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111\r\n' 322 325 ) 323 326 return … … 332 335 result, 333 336 'automatic,carry_over,code,credits,dcode,fcode,level,mandatory,' 334 ' matric_number,passmark,reg_number,score,semester,title\r\n'335 '1,1,CRS1,100,DEP1,FAC1,100,0, M123456,100,123456,0,2,Course1\r\n'337 'passmark,score,semester,title,student_id\r\n' 338 '1,1,CRS1,100,DEP1,FAC1,100,0,100,0,2,Course 1,A111111\r\n' 336 339 ) 337 340 return … … 368 371 self.assertEqual( 369 372 result, 370 'ac,amount_auth,creation_date, matric_number,p_category,p_id,'373 'ac,amount_auth,creation_date,p_category,p_id,' 371 374 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 372 'r_code,r_desc, reg_number\r\n'373 374 ',0.0,2012-04-01 13:12:01, ,schoolfee,,,,,unpaid,,0.0,,,\r\n'375 'r_code,r_desc,student_id\r\n' 376 377 ',0.0,2012-04-01 13:12:01,schoolfee,,,,,unpaid,,0.0,,,\r\n' 375 378 ) 376 379 return … … 386 389 self.assertEqual( 387 390 result, 388 'ac,amount_auth,creation_date, matric_number,p_category,p_id,'391 'ac,amount_auth,creation_date,p_category,p_id,' 389 392 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 390 'r_code,r_desc, reg_number\r\n'391 392 '666,0.0,2012-04-01 13:12:01, M123456,schoolfee,my-id,'393 'r_code,r_desc,student_id\r\n' 394 395 '666,0.0,2012-04-01 13:12:01,schoolfee,my-id,' 393 396 'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,' 394 'r-code,, 123456\r\n'397 'r-code,,A111111\r\n' 395 398 ) 396 399 return … … 405 408 self.assertEqual( 406 409 result, 407 'ac,amount_auth,creation_date, matric_number,p_category,p_id,'410 'ac,amount_auth,creation_date,p_category,p_id,' 408 411 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 409 'r_code,r_desc, reg_number\r\n'410 411 '666,0.0,2012-04-01 13:12:01, M123456,schoolfee,my-id,'412 'r_code,r_desc,student_id\r\n' 413 414 '666,0.0,2012-04-01 13:12:01,schoolfee,my-id,' 412 415 'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,' 413 'r-code,, 123456\r\n'416 'r-code,,A111111\r\n' 414 417 ) 415 418 return … … 424 427 self.assertEqual( 425 428 result, 426 'ac,amount_auth,creation_date, matric_number,p_category,p_id,'429 'ac,amount_auth,creation_date,p_category,p_id,' 427 430 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 428 'r_code,r_desc, reg_number\r\n'429 430 '666,0.0,2012-04-01 13:12:01, M123456,schoolfee,my-id,'431 'r_code,r_desc,student_id\r\n' 432 433 '666,0.0,2012-04-01 13:12:01,schoolfee,my-id,' 431 434 'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,' 432 'r-code,, 123456\r\n'433 ) 434 return 435 'r-code,,A111111\r\n' 436 ) 437 return
Note: See TracChangeset for help on using the changeset viewer.