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

Increase maximum credits.

Location:
main/waeup.fceokene/trunk/src/waeup/fceokene
Files:
3 edited

Legend:

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

    r9790 r9903  
    2828#   If you enable this, please make sure the external services
    2929#   do exist really and are not bothered by being spammed by a test programme.
    30 EXTERNAL_TESTS = True
     30EXTERNAL_TESTS = False
    3131
    3232def external_test(func):
  • 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)
  • main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py

    r9629 r9903  
    273273        return d
    274274
     275    def maxCredits(self, studylevel):
     276        """Return maximum credits.
     277
     278        """
     279        return 58
     280
    275281    # FCEOkene prefix
    276282    STUDENT_ID_PREFIX = u'K'
Note: See TracChangeset for help on using the changeset viewer.