Ignore:
Timestamp:
22 Oct 2012, 11:56:06 (12 years ago)
Author:
Henrik Bettermann
Message:

Configure clearance fee bank details.

File:
1 edited

Legend:

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

    r9006 r9384  
    5151        self.student.nationality = u'NG'
    5252        self.browser.open(self.payments_path + '/addop')
     53        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    5354        self.browser.getControl("Create ticket").click()
    5455        self.assertMatches('...ticket created...',
     
    5758        value = ctrl.options[0]
    5859        self.browser.getLink(value).click()
    59         self.assertMatches('...Amount Authorized...',
    60                            self.browser.contents)
    61         self.assertMatches(
    62             '...<span>40000.0</span>...',
    63             self.browser.contents)
    64         self.payment_url = self.browser.url
    6560
    6661
     
    7873    def test_interswitch_form(self):
    7974
     75        # School fee ticket already created in setUp method
     76        self.assertMatches('...Amount Authorized...',
     77                           self.browser.contents)
     78        self.assertMatches(
     79            '...<span>40000.0</span>...',
     80            self.browser.contents)
     81        self.payment_url = self.browser.url
    8082        # Manager can access InterswitchForm
    8183        self.browser.getLink("CollegePAY", index=0).click()
     
    8486        # The total amount to be processed by Interswitch
    8587        # has been reduced by the Interswitch fee of 150 Nairas
     88        self.assertMatches('...Total Amount Authorized:...',
     89                           self.browser.contents)
    8690        self.assertMatches(
    8791            '...<input type="hidden" name="amount" value="4000000.0" />...',
    8892            self.browser.contents)
     93        self.assertMatches(
     94            '...item_name="School Fee" item_amt="3835000" bank_id="" acct_num=""...',
     95            self.browser.contents)
     96        self.assertMatches(
     97            '...item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1010764827"...',
     98            self.browser.contents)
     99
     100        # Create clearance fee ticket
     101        self.browser.open(self.payments_path + '/addop')
     102        self.browser.getControl(name="form.p_category").value = ['clearance']
     103        self.browser.getControl("Create ticket").click()
     104        self.assertMatches('...ticket created...',
     105                           self.browser.contents)
     106        ctrl = self.browser.getControl(name='val_id')
     107        value = ctrl.options[1]
     108        self.browser.getLink(value).click()
     109        self.assertMatches('...Amount Authorized...',
     110                           self.browser.contents)
     111        self.assertMatches(
     112            '...<span>45000.0</span>...',
     113            self.browser.contents)
     114        # Manager can access InterswitchForm
     115        self.browser.getLink("CollegePAY", index=0).click()
     116        self.assertMatches('...Total Amount Authorized:...',
     117                           self.browser.contents)
     118        # The total amount to be processed by Interswitch
     119        # has been reduced by the Interswitch fee of 150 Nairas
     120        self.assertMatches('...Total Amount Authorized:...',
     121                           self.browser.contents)
     122        self.assertMatches(
     123            '...<input type="hidden" name="amount" value="4500000.0" />...',
     124            self.browser.contents)
     125        self.assertMatches(
     126            '...item_name="Acceptance Fee" item_amt="4335000" bank_id="7" acct_num="1003475516"...',
     127            self.browser.contents)
     128        self.assertMatches(
     129            '...item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1010764827"...',
     130            self.browser.contents)
     131
    89132
    90133#    @external_test
Note: See TracChangeset for help on using the changeset viewer.