Ignore:
Timestamp:
7 Jun 2012, 10:06:02 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement max_credits limit for course registration.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r8621 r8642  
    12551255        self.student['studycourse']['200']['COURSE1'].mandatory = False
    12561256        self.browser.open(self.student_path + '/studycourse/200/edit')
    1257         # Now the student can remove the ticket
     1257        # Course list can't be registered if total_credits exceeds max_credits
     1258        self.student['studycourse']['200']['COURSE1'].credits = 60
     1259        self.browser.getControl("Register course list").click()
     1260        self.assertTrue('Maximum credits of 50 exceeded' in self.browser.contents)
     1261        # Student can now remove the ticket
    12581262        ctrl = self.browser.getControl(name='val_id')
    12591263        ctrl.getControl(value='COURSE1').selected = True
    12601264        self.browser.getControl("Remove selected", index=0).click()
    12611265        self.assertTrue('Successfully removed' in self.browser.contents)
     1266        # Course list can be registered, even if it's empty
    12621267        self.browser.getControl("Register course list").click()
    12631268        self.assertTrue('Course list has been registered' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.