Ignore:
Timestamp:
12 Nov 2017, 17:02:44 (7 years ago)
Author:
Henrik Bettermann
Message:

Old returning students get a discount of N30000 (science) and N28000 (non-science) respectively. we use the custom_textline_1 attribute of certificates to distinguish science and non-science students.

File:
1 edited

Legend:

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

    r14857 r14892  
    542542        IWorkflowState(self.student).setState('returning')
    543543
    544 
    545544        #error, payment = utils.setPaymentDetails('schoolfee',
    546545        #    self.student, None, None)
     
    565564        self.assertEqual(error, None)
    566565
     566        # Old returning students pay less
     567        self.certificate.school_fee_2 = 50000.0
     568        self.certificate.custom_textline_1 = 'sciEnce'
     569        error, payment = utils.setPaymentDetails(
     570            'schoolfee', self.student, None, None)
     571        # minus 30000
     572        self.assertEqual(payment.amount_auth, 20088.0)
     573        self.certificate.custom_textline_1 = 'non-Science'
     574        error, payment = utils.setPaymentDetails(
     575            'schoolfee', self.student, None, None)
     576        # minus 28000
     577        self.assertEqual(payment.amount_auth, 22088.0)
     578
    567579        # Staff members pay less.
     580        self.certificate.custom_textline_1 = ''
    568581        self.student.is_staff = True
    569582        error, payment = utils.setPaymentDetails('schoolfee',
     
    571584        self.assertEqual(payment.p_level, 200)
    572585        self.assertEqual(payment.p_session, 2005)
    573         self.assertEqual(payment.amount_auth, 10088.0)
     586        self.assertEqual(payment.amount_auth, 25088.0)
    574587        self.assertEqual(payment.p_item, u'CERT1')
    575588        self.assertEqual(error, None)
Note: See TracChangeset for help on using the changeset viewer.