Ignore:
Timestamp:
7 Feb 2015, 10:25:56 (10 years ago)
Author:
Henrik Bettermann
Message:

Add new application category and type (ticket #966).

Implement hostel application fee payment (ticket #959). Uniben is still waiting for an agrrement with Interwsicth.

File:
1 edited

Legend:

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

    r12122 r12566  
    249249            name="form.p_category").value = ['tempmaint_1']
    250250        self.browser.getControl("Create ticket").click()
     251        self.assertMatches('...You have not yet paid the hostel application fee...',
     252                           self.browser.contents)
     253        self.browser.open(self.payments_path + '/addop')
     254        self.browser.getControl(name="form.p_category").value = ['hostel_application']
     255        self.browser.getControl("Create ticket").click()
     256        self.assertMatches('...ticket created...',
     257                           self.browser.contents)
     258        ha_ticket = self.student['payments'].values()[2]
     259        ha_ticket.approve()
     260        self.browser.open(self.payments_path + '/addop')
     261        self.browser.getControl(
     262            name="form.p_category").value = ['tempmaint_1']
     263        self.browser.getControl("Create ticket").click()
    251264        self.assertMatches('...ticket created...',
    252265                           self.browser.contents)
     
    579592        self.assertEqual(error, None)
    580593
    581         error, payment = utils.setPaymentDetails('hostel_maintenance',
     594        #error, payment = utils.setPaymentDetails('hostel_maintenance',
     595        #    self.student, None, None)
     596        #self.assertEqual(payment.p_level, 100)
     597        #self.assertEqual(payment.p_session, 2004)
     598        #self.assertEqual(payment.amount_auth, 180.0)
     599        #self.assertEqual(payment.p_item, u'')
     600        #self.assertEqual(error, None)
     601
     602        #error, payment = utils.setPaymentDetails('bed_allocation',
     603        #    self.student, None, None)
     604        #self.assertEqual(payment.p_level, 100)
     605        #self.assertEqual(payment.p_session, 2004)
     606        #self.assertEqual(payment.amount_auth, 150.0)
     607        #self.assertEqual(payment.p_item, u'')
     608        #self.assertEqual(error, None)
     609
     610        error, payment = utils.setPaymentDetails('hostel_application',
    582611            self.student, None, None)
    583612        self.assertEqual(payment.p_level, 100)
    584613        self.assertEqual(payment.p_session, 2004)
    585         self.assertEqual(payment.amount_auth, 180.0)
     614        self.assertEqual(payment.amount_auth, 1000.0)
    586615        self.assertEqual(payment.p_item, u'')
    587616        self.assertEqual(error, None)
    588617
    589         error, payment = utils.setPaymentDetails('bed_allocation',
    590             self.student, None, None)
    591         self.assertEqual(payment.p_level, 100)
    592         self.assertEqual(payment.p_session, 2004)
    593         self.assertEqual(payment.amount_auth, 150.0)
    594         self.assertEqual(payment.p_item, u'')
    595         self.assertEqual(error, None)
     618        payment.approve()
     619        self.student['payments'][payment.p_id] = payment
    596620
    597621        error, payment = utils.setPaymentDetails('tempmaint_1',
Note: See TracChangeset for help on using the changeset viewer.