Changeset 15095 for main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Timestamp:
- 31 Jul 2018, 08:16:59 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
r14958 r15095 22 22 from waeup.kofa.students.tests.test_browser import StudentsFullSetup 23 23 from waeup.kofa.students.interfaces import IStudentsUtils 24 from waeup.kofa.students.studylevel import StudentStudyLevel 24 25 from waeup.aaue.testing import FunctionalLayer 25 26 … … 250 251 self.assertEqual(msg, 'No certificate assigned.') 251 252 return 253 254 def test_getClassFromCGPA(self): 255 site = grok.getSite() 256 utils = getUtility(IStudentsUtils) 257 gpaclass, gpaboundary = utils.getClassFromCGPA(4.6, self.student) 258 self.assertEqual(gpaclass, 5) 259 self.assertEqual(gpaboundary, '1st Class Honours') 260 self.certificate.study_mode = 'dp_ft' 261 gpaclass, gpaboundary = utils.getClassFromCGPA(4.6, self.student) 262 self.assertEqual(gpaclass, 4) 263 self.assertEqual(gpaboundary, 'Distinction') 264 studylevel = StudentStudyLevel() 265 studylevel.level = 520 266 self.student['studycourse'].addStudentStudyLevel(self.certificate, 267 studylevel) 268 gpaclass, gpaboundary = utils.getClassFromCGPA(4.6, self.student) 269 self.assertEqual(gpaclass, 1) 270 self.assertEqual(gpaboundary, 'Pass')
Note: See TracChangeset for help on using the changeset viewer.