Ignore:
Timestamp:
7 May 2013, 19:12:39 (12 years ago)
Author:
Henrik Bettermann
Message:

In AAUA we have special postgrad students like in Uniben.

File:
1 edited

Legend:

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

    r10120 r10157  
    8282        self.student['accommodation'].addBedTicket(bedticket)
    8383
    84 
    85 
    8684    def test_student_start_clearance(self):
    8785        self.browser.open(self.login_path)
     
    9997            name='upload_passportuploadedit').click()
    10098        self.browser.open(self.student_path + '/start_clearance')
    101         # In Okene the students can just start clearance without entering
     99        # In AAUA the students can just start clearance without entering
    102100        # an activation code.
    103101        self.browser.getControl("Start clearance now").click()
     
    105103                           self.browser.contents)
    106104
    107     def test_student_accommodation(self):
    108         del self.student['accommodation']['2004']
    109         # Login
    110         self.browser.open(self.login_path)
    111         self.browser.getControl(name="form.login").value = self.student_id
    112         self.browser.getControl(name="form.password").value = 'spwd'
    113         self.browser.getControl("Login").click()
    114 
    115         # Students can book accommodation without AC ...
    116         self.browser.open(self.acco_path)
    117         IWorkflowInfo(self.student).fireTransition('admit')
    118         self.browser.getLink("Book accommodation").click()
    119         self.assertFalse('Activation Code:' in self.browser.contents)
    120         self.browser.getControl("Create bed ticket").click()
    121         # Bed is randomly selected but, since there is only
    122         # one bed for this student, we know that
    123         self.assertMatches('...Hall 1, Block A, Room 101, Bed A...',
    124                            self.browser.contents)
    125         return
     105    def test_next_session_allowed(self):
     106        # Let's see if next_session_allowed works as expected
     107        # A, ug_ft, 100
     108        IWorkflowState(self.student).setState('returning')
     109        self.assertTrue(self.student['studycourse'].next_session_allowed)
     110        # Uniben special PG programmes have the same workflow
     111        # as UG students
     112        self.certificate.study_mode = 'special_pg'
     113        self.assertTrue(self.student['studycourse'].next_session_allowed)
     114        IWorkflowState(self.student).setState('school fee paid')
     115        self.assertFalse(self.student['studycourse'].next_session_allowed)
     116        # Now we convert the certificate into a 'regular
     117        # postgraduate certificate ...
     118        self.certificate.study_mode = 'pg_xx'
     119        # ... and voila next session registration is allowed
     120        self.assertTrue(self.student['studycourse'].next_session_allowed)
Note: See TracChangeset for help on using the changeset viewer.