Ignore:
Timestamp:
26 Apr 2023, 12:20:53 (19 months ago)
Author:
Henrik Bettermann
Message:

Student union dues must be paid before tuition fee.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/tests/test_utils.py

    r17102 r17391  
    7171        self.app['configuration']['2004'].ict_entre_fee = 4170.0
    7272        self.app['configuration']['2005'].ict_entre_fee = 2180.0
     73        self.app['configuration']['2004'].union_fee = 1234.0
     74        self.app['configuration']['2005'].union_fee = 1434.0
    7375        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    74         self.assertEqual(error, u'Pay ICT fee(s) first.')
     76        self.assertEqual(error, u'Pay Student Union and ICT fee(s) first.')
    7577        error, payment = utils.setPaymentDetails('ict_entre',self.student)
    7678        self.assertEqual(error, None)
     
    8082        payment.p_state = 'paid'
    8183        self.student['payments']['any_key'] = payment
     84        error, payment = utils.setPaymentDetails('union',self.student)
     85        self.assertEqual(error, None)
     86        self.assertEqual(payment.p_level, 200)
     87        self.assertEqual(payment.p_session, 2005)
     88        self.assertEqual(payment.amount_auth, 1434.0)
     89        payment.p_state = 'paid'
     90        self.student['payments']['any_key_2'] = payment
    8291        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    8392        self.assertEqual(error, None)
     
    93102        self.assertEqual(payment.amount_auth, 4170.0)
    94103        payment.p_state = 'paid'
    95         self.student['payments']['any_key_2'] = payment
     104        self.student['payments']['any_key_3'] = payment
     105        error, payment = utils.setPaymentDetails('union',self.student)
     106        self.assertEqual(error, None)
     107        self.assertEqual(payment.p_level, 100)
     108        self.assertEqual(payment.p_session, 2004)
     109        self.assertEqual(payment.amount_auth, 1234.0)
     110        payment.p_state = 'paid'
     111        self.student['payments']['any_key_4'] = payment
    96112        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    97113        self.assertEqual(error, None)
Note: See TracChangeset for help on using the changeset viewer.