Ignore:
Timestamp:
26 Nov 2012, 14:41:57 (12 years ago)
Author:
Henrik Bettermann
Message:

Implement carry-over fee payment.

File:
1 edited

Legend:

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

    r9568 r9724  
    129129                           self.browser.contents)
    130130        self.browser.open(self.payments_path + '/addop')
    131         self.browser.getControl(name="form.p_category").value = ['gown']
    132         self.browser.getControl("Create ticket").click()
    133         self.assertMatches('...ticket created...',
    134                            self.browser.contents)
    135         self.browser.open(self.payments_path + '/addop')
    136         self.browser.getControl(name="form.p_category").value = ['transfer']
     131        self.browser.getControl(name="form.p_category").value = ['co1']
     132        self.browser.getControl("Create ticket").click()
     133        self.assertMatches('...ticket created...',
     134                           self.browser.contents)
     135        self.browser.open(self.payments_path + '/addop')
     136        self.browser.getControl(name="form.p_category").value = ['co2']
     137        self.browser.getControl("Create ticket").click()
     138        self.assertMatches('...ticket created...',
     139                           self.browser.contents)
     140        self.browser.open(self.payments_path + '/addop')
     141        self.browser.getControl(name="form.p_category").value = ['co3']
    137142        self.browser.getControl("Create ticket").click()
    138143        self.assertMatches('...ticket created...',
     
    251256        self.assertEqual(error, None)
    252257
    253         error, payment = utils.setPaymentDetails('gown',self.student)
     258        error, payment = utils.setPaymentDetails('co1',self.student)
     259        self.assertEqual(payment.p_level, 100)
     260        self.assertEqual(payment.p_session, 2004)
     261        self.assertEqual(payment.amount_auth, 6000.0)
     262        self.assertEqual(payment.p_item, u'')
     263        self.assertEqual(error, None)
     264
     265        error, payment = utils.setPaymentDetails('co2',self.student)
     266        self.assertEqual(payment.p_level, 100)
     267        self.assertEqual(payment.p_session, 2004)
     268        self.assertEqual(payment.amount_auth, 7000.0)
     269        self.assertEqual(payment.p_item, u'')
     270        self.assertEqual(error, None)
     271
     272        error, payment = utils.setPaymentDetails('co3',self.student)
     273        self.assertEqual(payment.p_level, 100)
     274        self.assertEqual(payment.p_session, 2004)
     275        self.assertEqual(payment.amount_auth, 8000.0)
     276        self.assertEqual(payment.p_item, u'')
     277        self.assertEqual(error, None)
     278
     279        error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
     280        self.assertEqual(payment.p_level, 100)
     281        self.assertEqual(payment.p_session, 2004)
     282        self.assertEqual(payment.amount_auth, 180.0)
     283        self.assertEqual(payment.p_item, u'')
     284        self.assertEqual(error, None)
     285
     286        error, payment = utils.setPaymentDetails('bed_allocation',self.student)
    254287        self.assertEqual(payment.p_level, 100)
    255288        self.assertEqual(payment.p_session, 2004)
    256289        self.assertEqual(payment.amount_auth, 150.0)
    257         self.assertEqual(payment.p_item, u'')
    258         self.assertEqual(error, None)
    259 
    260         error, payment = utils.setPaymentDetails('hostel_maintenance',self.student)
    261         self.assertEqual(payment.p_level, 100)
    262         self.assertEqual(payment.p_session, 2004)
    263         self.assertEqual(payment.amount_auth, 180.0)
    264         self.assertEqual(payment.p_item, u'')
    265         self.assertEqual(error, None)
    266 
    267         error, payment = utils.setPaymentDetails('bed_allocation',self.student)
    268         self.assertEqual(payment.p_level, 100)
    269         self.assertEqual(payment.p_session, 2004)
    270         self.assertEqual(payment.amount_auth, 150.0)
    271         self.assertEqual(payment.p_item, u'')
    272         self.assertEqual(error, None)
    273 
    274         error, payment = utils.setPaymentDetails('transfer',self.student)
    275         self.assertEqual(payment.p_level, 100)
    276         self.assertEqual(payment.p_session, 2004)
    277         self.assertEqual(payment.amount_auth, 90.0)
    278290        self.assertEqual(payment.p_item, u'')
    279291        self.assertEqual(error, None)
Note: See TracChangeset for help on using the changeset viewer.