Ignore:
Timestamp:
9 Mar 2017, 16:33:34 (8 years ago)
Author:
Henrik Bettermann
Message:

Fresh students don't have to pay penalty fee.

Revert to old rule for maximum credits per session.

File:
1 edited

Legend:

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

    r14591 r14617  
    3131        return
    3232
    33     def test_warnCreditsOOR(self):
     33    def disabled_test_warnCreditsOOR_semester_exceeded(self):
    3434        students_utils = getUtility(IStudentsUtils)
    3535        studylevel = grok.Container()
     
    5454        return
    5555
     56    def test_warnCreditsOOR(self):
     57        students_utils = getUtility(IStudentsUtils)
     58        studylevel = grok.Container()
     59        studylevel.total_credits = 45
     60        course = grok.Model()
     61        course.credits = 7
     62        warning = students_utils.warnCreditsOOR(studylevel, course)
     63        self.assertEqual(warning, None)
     64        course.credits = 8
     65        warning = students_utils.warnCreditsOOR(studylevel, course)
     66        self.assertEqual(warning, 'Maximum credits exceeded.')
     67        studylevel.total_credits_s1 = 17
     68        warning = students_utils.warnCreditsOOR(studylevel)
     69        self.assertEqual(warning, 'Minimum credits in 1st semester not reached.')
     70        return
     71
    5672    def test_set_payment_details(self):
    5773        self.certificate.end_level = 300
Note: See TracChangeset for help on using the changeset viewer.