Ignore:
Timestamp:
4 Nov 2012, 07:48:11 (12 years ago)
Author:
Henrik Bettermann
Message:

Reorganize getReturningData.

Students can pay for previous sessions in all workflow states.
Fresh students are excluded by the update method of the
PreviousPaymentAddFormPage?.

Students are only allowed to pay for the next session if current session payment has really been made, i.e. payment object exists and is paid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py

    r9515 r9520  
    9797            self.browser.contents)
    9898
    99         # Create school fee ticket for returning students
     99        # Create school fee ticket for returning students. Payment is made
     100        # for next session.
     101        current_payment_key = self.student['payments'].keys()[0]
    100102        self.certificate.study_mode = u'ug_pt'
    101103        IWorkflowState(self.student).setState('returning')
     
    103105        configuration.academic_session = 2005
    104106        self.app['configuration'].addSessionConfiguration(configuration)
     107        self.browser.open(self.payments_path + '/addop')
     108        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     109        self.browser.getControl("Create ticket").click()
     110        # Next session payment can't be made ...
     111        self.assertMatches(
     112            '...You have not yet paid your current/active session...',
     113            self.browser.contents)
     114        # current session payment must be approved first.
     115        self.student['payments'][current_payment_key].approve()
    105116        self.browser.open(self.payments_path + '/addop')
    106117        self.browser.getControl(name="form.p_category").value = ['schoolfee']
Note: See TracChangeset for help on using the changeset viewer.