Ignore:
Timestamp:
7 Nov 2019, 17:45:43 (5 years ago)
Author:
Henrik Bettermann
Message:

Adjust to Nigeria package.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py

    r15728 r15773  
    7575                           self.browser.contents)
    7676        self.assertEqual(self.student.current_mode, 'ug_ft')
    77         self.assertTrue(
    78             '<input type="hidden" name="amount" value="4000000" />' in
    79             self.browser.contents)
    80         self.assertTrue(
    81             'item_name="Tuition Plus (total amount)" item_amt="3475000" bank_id="117" acct_num="1011005811"' in
     77        # 250 gateway charge have been added
     78        payment = self.student['payments'][self.value]
     79        self.assertEqual(payment.amount_auth, 40250)
     80        self.assertEqual(payment.net_amt, 40000)
     81        self.assertTrue(
     82            '<input type="hidden" name="amount" value="4025000" />' in
     83            self.browser.contents)
     84        self.assertTrue(
     85            'item_name="Tuition Plus (total amount)" item_amt="4000000" bank_id="117" acct_num="1011005811"' in
    8286            self.browser.contents)
    8387
     
    8690        acc_payment = createObject('waeup.StudentOnlinePayment')
    8791        acc_payment.p_state = 'unpaid'
    88         acc_payment.p_category = 'clearance'
     92        acc_payment.p_category = 'registration'
    8993        acc_payment.p_id = 'xyz'
    9094        acc_payment.pay_item_id = '123'
    91         acc_payment.amount_auth = 876.0
     95        acc_payment.amount_auth = 1000.0
    9296        self.student['payments']['xyz'] = acc_payment
    9397        self.browser.open(self.payments_path + '/xyz')
    9498        self.browser.getLink("Pay via Interswitch", index=0).click()
    95         self.assertMatches('...<input type="hidden" name="pay_item_id" value="102" />...',
     99        self.assertTrue('<input type="hidden" name="pay_item_id" value="102" />' in
    96100                           self.browser.contents)
    97101        self.assertMatches('...Total Amount Authorized:...',
    98102                           self.browser.contents)
    99103        self.assertEqual(self.student.current_mode, 'ug_ft')
    100         self.assertMatches(
    101             '...<input type="hidden" name="amount" value="87600" />...',
    102             self.browser.contents)
     104        # 5000 provider charge and 250 gateway charge have been added
     105        self.assertTrue(
     106            '<input type="hidden" name="amount" value="625000" />' in
     107            self.browser.contents)
     108        self.assertEqual(acc_payment.amount_auth, 6250)
     109        self.assertEqual(acc_payment.net_amt, 1000)
    103110        delta = timedelta(days=8)
    104111        acc_payment.creation_date -= delta
Note: See TracChangeset for help on using the changeset viewer.