Changeset 10479 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 12 Aug 2013, 08:57:26 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10472 r10479 799 799 self.browser.open(self.student_path + '/studycourse/100') 800 800 # total credits 801 self.assertEqual(self.student['studycourse']['100'].gpa_params [1], 23)801 self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[1], 23) 802 802 # weigheted credits = 3 * 10 + 4 * 13 803 self.assertEqual(self.student['studycourse']['100'].gpa_params [2], 82.0)803 self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[2], 82.0) 804 804 # sgpa = 82 / 23 805 self.assertEqual(self.student['studycourse']['100'].gpa_params [0], 3.57)805 self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 3.57) 806 806 # Carry-over courses will be collected when next level is created 807 807 self.browser.open(self.student_path + '/studycourse/manage') … … 833 833 studylevel['COURSE1'].score = studylevel['COURSE1'].passmark + 1 834 834 # GPA is 1. 835 self.assertEqual(self.student['studycourse']['100'].gpa_params [0], 1.0)835 self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 1.0) 836 836 # Set score below passmark. 837 837 studylevel['COURSE1'].score = studylevel['COURSE1'].passmark - 1 838 838 # GPA is still 0. 839 self.assertEqual(self.student['studycourse']['100'].gpa_params [0], 0.0)839 self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 0.0) 840 840 studylevel2 = createObject(u'waeup.StudentStudyLevel') 841 841 studylevel2.level = 200 … … 847 847 # The score of the carry-over course is now used for calculation of the 848 848 # GPA at level 100 ... 849 self.assertEqual(self.student['studycourse']['100'].gpa_params [0], 4.0)849 self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 4.0) 850 850 # ... but not at level 200 851 self.assertEqual(self.student['studycourse']['200'].gpa_params [0], 0.0)851 self.assertEqual(self.student['studycourse']['200'].gpa_params_rectified[0], 0.0) 852 852 return 853 853 … … 1897 1897 self.student['studycourse']['110']['COURSE2'] = courseticket 1898 1898 self.student['studycourse']['100']['COURSE1'].score = 55 1899 self.assertEqual(self.student['studycourse']['100'].gpa_params [0], 3.0)1900 self.assertEqual(self.student['studycourse']['110'].gpa_params [0], 4.0)1899 self.assertEqual(self.student['studycourse']['100'].gpa_params_rectified[0], 3.0) 1900 self.assertEqual(self.student['studycourse']['110'].gpa_params_rectified[0], 4.0) 1901 1901 # Get transcript data 1902 1902 td = self.student['studycourse'].getTranscriptData() -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r10458 r10479 403 403 self.assertEqual( 404 404 result, 405 ' level,level_session,level_verdict,total_credits,'405 'gpa,level,level_session,level_verdict,total_credits,' 406 406 'validated_by,validation_date,' 407 407 'student_id,number_of_tickets,certcode\r\n' 408 ' ,,0,0,,,,0,\r\n'408 '0.0,,,0,0,,,,0,\r\n' 409 409 ) 410 410 return … … 421 421 self.assertEqual( 422 422 result, 423 ' level,level_session,level_verdict,total_credits,'423 'gpa,level,level_session,level_verdict,total_credits,' 424 424 'validated_by,validation_date,' 425 425 'student_id,number_of_tickets,certcode\r\n' 426 ' 100,2012,A,100,,,A111111,1,CERT1\r\n'426 '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n' 427 427 ) 428 428 return … … 437 437 self.assertEqual( 438 438 result, 439 ' level,level_session,level_verdict,total_credits,'439 'gpa,level,level_session,level_verdict,total_credits,' 440 440 'validated_by,validation_date,' 441 441 'student_id,number_of_tickets,certcode\r\n' 442 ' 100,2012,A,100,,,A111111,1,CERT1\r\n'442 '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n' 443 443 ) 444 444 return … … 452 452 self.assertEqual( 453 453 result, 454 ' level,level_session,level_verdict,total_credits,'454 'gpa,level,level_session,level_verdict,total_credits,' 455 455 'validated_by,validation_date,' 456 456 'student_id,number_of_tickets,certcode\r\n' 457 ' 100,2012,A,100,,,A111111,1,CERT1\r\n'457 '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n' 458 458 ) 459 459 return … … 471 471 self.assertEqual( 472 472 result, 473 ' level,level_session,level_verdict,total_credits,'473 'gpa,level,level_session,level_verdict,total_credits,' 474 474 'validated_by,validation_date,' 475 475 'student_id,number_of_tickets,certcode\r\n' 476 ' 100,2012,A,100,,,A111111,1,CERT1\r\n'476 '0.0,100,2012,A,100,,,A111111,1,CERT1\r\n' 477 477 ) 478 478 return
Note: See TracChangeset for help on using the changeset viewer.