Ignore:
Timestamp:
18 Jan 2013, 14:21:57 (12 years ago)
Author:
Henrik Bettermann
Message:

Increase maximum credits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py

    r9207 r9903  
    11# -*- coding: utf-8 -*-
     2import grok
    23from waeup.kofa.testing import FunctionalTestCase
    34from zope.component import getUtility
     
    2728        self.assertEqual(acc_details['bt'], 'regular_male_fi')
    2829        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.