Changeset 14587 for main/waeup.kwarapoly


Ignore:
Timestamp:
24 Feb 2017, 09:28:31 (8 years ago)
Author:
Henrik Bettermann
Message:

Replace maxCreditsExceeded by warnCreditsOOR.

Location:
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students
Files:
2 edited

Legend:

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

    r13535 r14587  
    11# -*- coding: utf-8 -*-
     2import grok
    23from hurry.workflow.interfaces import IWorkflowState
    34from zope.component import getUtility
     
    8687        self.assertEqual(msg, 'No certificate assigned.')
    8788        return
     89
     90    def test_maxCreditsExceeded(self):
     91        students_utils = getUtility(IStudentsUtils)
     92        studylevel = grok.Container()
     93        studylevel.total_credits = 60
     94        course = grok.Model()
     95        course.credits = 88
     96        warning = students_utils.warnCreditsOOR(studylevel, course)
     97        self.assertEqual(warning, None)
     98        return
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py

    r14273 r14587  
    102102    """
    103103
    104     def maxCredits(self, studylevel):
     104    def warnCreditsOOR(self, studylevel, course=None):
    105105        # Students do not have any credit load limit
    106         return None
     106        return
    107107
    108108    def selectBed(self, available_beds, desired_hostel):
Note: See TracChangeset for help on using the changeset viewer.