Ignore:
Timestamp:
29 Oct 2014, 21:23:53 (10 years ago)
Author:
Henrik Bettermann
Message:

Add payment category 'NCE Third Semester Fee' which can be set in session configuration objects. Remove unused payment categories.

File:
1 edited

Legend:

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

    r10876 r11913  
    8484    def test_manage_payments(self):
    8585        # Add missing configuration data
    86         self.app['configuration']['2004'].gown_fee = 150.0
    87         self.app['configuration']['2004'].transfer_fee = 90.0
     86        self.app['configuration']['2004'].third_semester_fee = 90.0
    8887        self.app['configuration']['2004'].clearance_fee = 120.0
    8988        self.app['configuration']['2004'].booking_fee = 150.0
     
    131130                           self.browser.contents)
    132131        self.browser.open(self.payments_path + '/addop')
    133         self.browser.getControl(name="form.p_category").value = ['gown']
    134         self.browser.getControl("Create ticket").click()
    135         self.assertMatches('...ticket created...',
    136                            self.browser.contents)
    137         self.browser.open(self.payments_path + '/addop')
    138         self.browser.getControl(name="form.p_category").value = ['transfer']
     132        self.browser.getControl(name="form.p_category").value = ['third_semester']
     133        self.browser.getControl("Create ticket").click()
     134        self.assertMatches('...could not be determined...',
     135                           self.browser.contents)
     136        self.certificate.study_mode = 'nce_ft'
     137        self.browser.open(self.payments_path + '/addop')
     138        self.browser.getControl(name="form.p_category").value = ['third_semester']
    139139        self.browser.getControl("Create ticket").click()
    140140        self.assertMatches('...ticket created...',
     
    214214
    215215    def test_set_payment_details(self):
    216         self.app['configuration']['2004'].gown_fee = 150.0
    217         self.app['configuration']['2004'].transfer_fee = 90.0
     216        self.app['configuration']['2004'].third_semester_fee = 90.0
    218217        self.app['configuration']['2004'].booking_fee = 150.0
    219218        self.app['configuration']['2004'].maint_fee = 180.0
     
    274273        self.assertEqual(error, None)
    275274
    276         error, payment = utils.setPaymentDetails('gown',self.student)
    277         self.assertEqual(payment.p_level, 100)
    278         self.assertEqual(payment.p_session, 2004)
    279         self.assertEqual(payment.amount_auth, 300.0)
    280         self.assertEqual(payment.p_item, u'')
    281         self.assertEqual(error, None)
    282 
    283275        self.student['studycourse'].current_session = 2005
    284276        error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
     
    294286        self.assertEqual(error, None)
    295287
     288        error, payment = utils.setPaymentDetails('third_semester',self.student)
     289        self.assertEqual(payment.p_level, 100)
     290        self.assertEqual(payment.p_session, 2004)
     291        self.assertEqual(payment.amount_auth, 240.0)
     292        self.assertEqual(payment.p_item, u'')
     293        self.assertEqual(error, None)
     294
    296295        self.certificate.study_mode = u'nce_sw'
    297296        error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
     
    306305        self.assertEqual(payment.p_session, 2004)
    307306        self.assertEqual(payment.amount_auth, 300.0)
    308         self.assertEqual(payment.p_item, u'')
    309         self.assertEqual(error, None)
    310 
    311         error, payment = utils.setPaymentDetails('transfer',self.student)
    312         self.assertEqual(payment.p_level, 100)
    313         self.assertEqual(payment.p_session, 2004)
    314         self.assertEqual(payment.amount_auth, 240.0)
    315307        self.assertEqual(payment.p_item, u'')
    316308        self.assertEqual(error, None)
Note: See TracChangeset for help on using the changeset viewer.