Changeset 10267 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 31 May 2013, 18:19:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r10266 r10267 1820 1820 self.student['studycourse'].addStudentStudyLevel( 1821 1821 self.certificate, studylevel) 1822 # Add second course 1822 studylevel2 = createObject(u'waeup.StudentStudyLevel') 1823 studylevel2.level = 110 1824 studylevel2.level_session = 2006 1825 self.student['studycourse'].addStudentStudyLevel( 1826 self.certificate, studylevel2) 1827 # Add second course (COURSE has been added automatically) 1823 1828 courseticket = createObject('waeup.CourseTicket') 1824 1829 courseticket.code = 'ANYCODE' … … 1829 1834 courseticket.dcode = u'ANYDCODE' 1830 1835 courseticket.fcode = u'ANYFCODE' 1831 self.student['studycourse']['1 00']['COURSE2'] = courseticket1836 self.student['studycourse']['110']['COURSE2'] = courseticket 1832 1837 self.student['studycourse']['100']['COURSE1'].score = 55 1833 self.assertEqual(self.student['studycourse']['100'].gpa, 3.57) 1838 self.assertEqual(self.student['studycourse']['100'].gpa, 3.0) 1839 self.assertEqual(self.student['studycourse']['110'].gpa, 4.0) 1834 1840 # Get transcript data 1835 1841 td = self.student['studycourse'].getTranscriptData() 1836 1842 self.assertEqual(td[0][0]['level_key'], '100') 1837 self.assertEqual(td[0][0]['sgpa'], 3. 57)1843 self.assertEqual(td[0][0]['sgpa'], 3.0) 1838 1844 self.assertEqual(td[0][0]['level'].level, 100) 1839 1845 self.assertEqual(td[0][0]['level'].level_session, 2005) 1840 self.assertEqual(td[0][0]['tickets_1'][0].code, 'ANYCODE') 1841 self.assertEqual(td[0][0]['tickets_1'][1].code, 'COURSE1') 1846 self.assertEqual(td[0][0]['tickets_1'][0].code, 'COURSE1') 1847 self.assertEqual(td[0][1]['level_key'], '110') 1848 self.assertEqual(td[0][1]['sgpa'], 4.0) 1849 self.assertEqual(td[0][1]['level'].level, 110) 1850 self.assertEqual(td[0][1]['level'].level_session, 2006) 1851 self.assertEqual(td[0][1]['tickets_1'][0].code, 'ANYCODE') 1842 1852 self.assertEqual(td[1], 3.57) 1843 1853 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
Note: See TracChangeset for help on using the changeset viewer.