Changeset 10277 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 5 Jun 2013, 09:07:33 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10276 r10277 819 819 self.assertTrue( 820 820 self.student['studycourse']['200']['COURSE1'].carry_over) 821 return 822 823 def test_gpa_calculation_with_carryover(self): 824 studylevel = createObject(u'waeup.StudentStudyLevel') 825 studylevel.level = 100 826 studylevel.level_session = 2005 827 self.student['studycourse'].entry_mode = 'ug_ft' 828 self.student['studycourse'].addStudentStudyLevel( 829 self.certificate, studylevel) 830 # First course has been added automatically. 831 # Set score above passmark. 832 studylevel['COURSE1'].score = studylevel['COURSE1'].passmark + 1 833 # GPA is 1. 834 self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 1.0) 835 # Set score below passmark. 836 studylevel['COURSE1'].score = studylevel['COURSE1'].passmark - 1 837 # GPA is still 0. 838 self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 0.0) 839 studylevel2 = createObject(u'waeup.StudentStudyLevel') 840 studylevel2.level = 200 841 studylevel2.level_session = 2006 842 self.student['studycourse'].addStudentStudyLevel( 843 self.certificate, studylevel2) 844 # Carry-over course has been autonatically added. 845 studylevel2['COURSE1'].score = 66 846 # The score of the carry-over course is now used for calculation of the 847 # GPA at level 100 ... 848 self.assertEqual(self.student['studycourse']['100'].gpa_params[0], 4.0) 849 # ... but not at level 200 850 self.assertEqual(self.student['studycourse']['200'].gpa_params[0], 0.0) 821 851 return 822 852 … … 1816 1846 'temp_password generated: %s' % temp_password in logcontent) 1817 1847 1818 def test_transcrtipts(self): 1819 self.student.date_of_birth = date(1981, 2, 4) 1848 def test_transcripts(self): 1820 1849 studylevel = createObject(u'waeup.StudentStudyLevel') 1821 1850 studylevel.level = 100
Note: See TracChangeset for help on using the changeset viewer.