- Timestamp:
- 18 Jan 2013, 14:21:57 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py
r9207 r9903 1 1 # -*- coding: utf-8 -*- 2 import grok 2 3 from waeup.kofa.testing import FunctionalTestCase 3 4 from zope.component import getUtility … … 27 28 self.assertEqual(acc_details['bt'], 'regular_male_fi') 28 29 return 30 31 def test_maxCreditsExceeded(self): 32 students_utils = getUtility(IStudentsUtils) 33 studylevel = grok.Container() 34 studylevel.total_credits = 40 35 course = grok.Model() 36 course.credits = 18 37 max_credits = students_utils.maxCreditsExceeded(studylevel, course) 38 self.assertEqual(max_credits, 0) 39 course.credits = 19 40 max_credits = students_utils.maxCreditsExceeded(studylevel, course) 41 self.assertEqual(max_credits, 58)
Note: See TracChangeset for help on using the changeset viewer.