Ignore:
Timestamp:
10 Jun 2014, 11:52:31 (10 years ago)
Author:
Henrik Bettermann
Message:

Fix fee calculation for 'Loss of ID Card' payments.

File:
1 edited

Legend:

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

    r11677 r11682  
    371371        self.assertEqual(self.student['payments'][value].thirdparty_amt, 200.0)
    372372
     373        self.app['configuration']['2004'].loss_idcard_fee = 3000.0
     374        self.browser.open(self.payments_path + '/addop')
     375        self.browser.getControl(name="form.p_category").value = ['loss_idcard']
     376        self.browser.getControl("Create ticket").click()
     377        ctrl = self.browser.getControl(name='val_id')
     378        value = ctrl.options[6]
     379        self.browser.getLink(value).click()
     380        self.assertMatches('...Amount Authorized...', self.browser.contents)
     381        self.assertMatches(
     382            '...<span>3000.0</span>...', self.browser.contents)
     383        self.payment_url = self.browser.url
     384        self.browser.getLink("CollegePAY", index=0).click()
     385        self.assertEqual(self.student['payments'][value].amount_auth, 3000.0)
     386        self.assertEqual(self.student['payments'][value].provider_amt, 9.0)
     387        self.assertEqual(self.student['payments'][value].gateway_amt, 15.0)
     388        self.assertEqual(self.student['payments'][value].thirdparty_amt, 6.0)
     389
     390
    373391    @external_test
    374392    def test_webservice(self):
     
    511529            in self.browser.contents)
    512530        self.assertTrue(
    513             '<item_detail item_id="1" item_name="application" '
     531            '<item_detail item_id="1" item_name="Application Fee" '
    514532            'item_amt="253300" bank_id="120" acct_num="1771440667" />'
    515533            in self.browser.contents)
     
    523541        self.browser.getLink("CollegePAY", index=0).click()
    524542        self.assertTrue(
    525             '<item_detail item_id="1" item_name="application" '
     543            '<item_detail item_id="1" item_name="Application Fee" '
    526544            'item_amt="253300" bank_id="120" acct_num="1771440667" />'
    527545            in self.browser.contents)
     
    544562        self.browser.getLink("CollegePAY", index=0).click()
    545563        self.assertTrue(
    546             '<item_detail item_id="1" item_name="application" '
     564            '<item_detail item_id="1" item_name="Application Fee" '
    547565            'item_amt="303300" bank_id="8" acct_num="2013910271" />'
    548566            in self.browser.contents)
     
    559577        self.browser.getLink("CollegePAY", index=0).click()
    560578        self.assertTrue(
    561             '<item_detail item_id="1" item_name="application" '
     579            '<item_detail item_id="1" item_name="Application Fee" '
    562580            'item_amt="303300" bank_id="10" acct_num="0106259811" />'
    563581            in self.browser.contents)
     
    606624        self.browser.getLink("CollegePAY", index=0).click()
    607625        self.assertTrue(
    608             '<item_detail item_id="1" item_name="transcript_local" '
     626            '<item_detail item_id="1" item_name="ND Transcript (local)" '
    609627            'item_amt="450000" bank_id="9" acct_num="7000016724" />'
    610628            in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.