Changeset 10276 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 5 Jun 2013, 08:02:29 (12 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
r10267 r10276 785 785 self.assertEqual(self.student['studycourse']['100']['COURSE1'].grade, 'C') 786 786 self.assertEqual(self.student['studycourse']['100']['COURSE1'].weight, 3) 787 # We add another ticket to check if GPA 787 # We add another ticket to check if GPAwill be correctly calculated 788 788 # (and rounded) 789 789 courseticket = createObject('waeup.CourseTicket') … … 797 797 self.student['studycourse']['100']['COURSE2'] = courseticket 798 798 self.browser.open(self.student_path + '/studycourse/100') 799 self.assertTrue('<div>3.57</div>' in self.browser.contents) 800 self.assertEqual(self.student['studycourse']['100'].gpa, 3.57) 799 # total credits 800 self.assertEqual(self.student['studycourse']['100'].gpa_params[1], 23) 801 # weigheted credits = 3 * 10 + 4 * 13 802 self.assertEqual(self.student['studycourse']['100'].gpa_params[2], 82.0) 803 # sgpa = 82 / 23 804 self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 3.57) 801 805 # Carry-over courses will be collected when next level is created 802 806 self.browser.open(self.student_path + '/studycourse/manage') … … 1836 1840 self.student['studycourse']['110']['COURSE2'] = courseticket 1837 1841 self.student['studycourse']['100']['COURSE1'].score = 55 1838 self.assertEqual(self.student['studycourse']['100'].gpa , 3.0)1839 self.assertEqual(self.student['studycourse']['110'].gpa , 4.0)1842 self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 3.0) 1843 self.assertEqual(self.student['studycourse']['110'].gpa_params[0], 4.0) 1840 1844 # Get transcript data 1841 1845 td = self.student['studycourse'].getTranscriptData() -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r10245 r10276 402 402 self.assertEqual( 403 403 result, 404 ' gpa,level,level_session,level_verdict,total_credits,'404 'level,level_session,level_verdict,total_credits,' 405 405 'validated_by,validation_date,' 406 406 'student_id,number_of_tickets,certcode\r\n' 407 ' 0.0,,,0,0,,,,0,\r\n'407 ',,0,0,,,,0,\r\n' 408 408 ) 409 409 return … … 420 420 self.assertEqual( 421 421 result, 422 ' gpa,level,level_session,level_verdict,total_credits,'422 'level,level_session,level_verdict,total_credits,' 423 423 'validated_by,validation_date,' 424 424 'student_id,number_of_tickets,certcode\r\n' 425 ' 0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'425 '100,2012,A,100,,,A111111,1,CERT1\r\n' 426 426 ) 427 427 return … … 436 436 self.assertEqual( 437 437 result, 438 ' gpa,level,level_session,level_verdict,total_credits,'438 'level,level_session,level_verdict,total_credits,' 439 439 'validated_by,validation_date,' 440 440 'student_id,number_of_tickets,certcode\r\n' 441 ' 0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'441 '100,2012,A,100,,,A111111,1,CERT1\r\n' 442 442 ) 443 443 return … … 451 451 self.assertEqual( 452 452 result, 453 ' gpa,level,level_session,level_verdict,total_credits,'453 'level,level_session,level_verdict,total_credits,' 454 454 'validated_by,validation_date,' 455 455 'student_id,number_of_tickets,certcode\r\n' 456 ' 0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'456 '100,2012,A,100,,,A111111,1,CERT1\r\n' 457 457 ) 458 458 return … … 470 470 self.assertEqual( 471 471 result, 472 ' gpa,level,level_session,level_verdict,total_credits,'472 'level,level_session,level_verdict,total_credits,' 473 473 'validated_by,validation_date,' 474 474 'student_id,number_of_tickets,certcode\r\n' 475 ' 0.0,100,2012,A,100,,,A111111,1,CERT1\r\n'475 '100,2012,A,100,,,A111111,1,CERT1\r\n' 476 476 ) 477 477 return
Note: See TracChangeset for help on using the changeset viewer.