Ignore:
Timestamp:
20 May 2012, 11:21:13 (13 years ago)
Author:
Henrik Bettermann
Message:

Enable postgraduate workflow in custom package.

File:
1 edited

Legend:

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

    r8444 r8474  
    113113        ticket = createObject(u'waeup.CourseTicket')
    114114        verify.verifyObject(ICustomCourseTicket, ticket)
    115         # Let's see if may_register works as expected
     115        IWorkflowState(self.student).setState('returning')
     116        # Let's see if next_session_allowed works as expected
    116117        # A, ug_ft, 100
    117         self.assertTrue(self.student['studycourse'].may_register)
     118        self.assertTrue(self.student['studycourse'].next_session_allowed)
    118119        # O, ug_ft, 100
    119120        self.student['studycourse'].current_verdict = 'O'
    120         self.assertTrue(self.student['studycourse'].may_register)
     121        self.assertTrue(self.student['studycourse'].next_session_allowed)
    121122        # O, ug_ft, 200
    122123        self.student['studycourse'].current_level = 200
    123         self.assertFalse(self.student['studycourse'].may_register)
     124        self.assertFalse(self.student['studycourse'].next_session_allowed)
    124125        # O, de_ft, 200
    125126        self.student['studycourse'].certificate.study_mode = 'de_ft'
    126         self.assertTrue(self.student['studycourse'].may_register)
     127        self.assertTrue(self.student['studycourse'].next_session_allowed)
    127128        # O, ph_ft, 300
    128129        self.student['studycourse'].certificate.study_mode = 'ph_ft'
    129130        self.student['studycourse'].current_level = 300
    130         self.assertTrue(self.student['studycourse'].may_register)
     131        self.assertTrue(self.student['studycourse'].next_session_allowed)
    131132        # O, ph_ft, 400
    132133        self.student['studycourse'].current_level = 400
    133         self.assertFalse(self.student['studycourse'].may_register)
     134        self.assertFalse(self.student['studycourse'].next_session_allowed)
     135
     136        # Now we convert the certificate into a postgraduate certificate
     137        IWorkflowState(self.student).setState('school fee paid')
     138        self.certificate.study_mode = 'pg_ft'
     139        # ... and voila next session registration is allowed
     140        self.assertTrue(self.student['studycourse'].next_session_allowed)
    134141
    135142    def test_manage_access(self):
Note: See TracChangeset for help on using the changeset viewer.