Changeset 16137 for main/kofacustom.iuokada/trunk/src/kofacustom
- Timestamp:
- 28 Jun 2020, 20:59:32 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py
r16082 r16137 53 53 54 54 def test_interswitch_form(self): 55 # Manager can access InterswitchForm55 self.app['configuration']['2004'].registration_fee = 2000.0 56 56 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 57 57 self.browser.open(self.payments_path) … … 59 59 self.student.nationality = u'NG' 60 60 self.browser.open(self.payments_path + '/addop') 61 self.browser.getControl(name="form.p_category").value = [' schoolfee']61 self.browser.getControl(name="form.p_category").value = ['registration'] 62 62 self.browser.getControl("Create payment").click() 63 self.assertMatches('...Payment created...', 64 self.browser.contents) 63 self.assertTrue('Payment created' in self.browser.contents) 65 64 ctrl = self.browser.getControl(name='val_id') 66 65 self.value = ctrl.options[0] 67 66 self.browser.getLink(self.value).click() 68 self.assertMatches('...Amount Authorized...', 69 self.browser.contents) 70 self.assertTrue( 71 '<span>40000.0</span>' in self.browser.contents) 67 self.assertTrue( 68 '<span>2000.0</span>' in self.browser.contents) 72 69 self.payment_url = self.browser.url 73 70 self.browser.getLink("Pay via Interswitch", index=0).click() 74 self.assertTrue('<input type="hidden" name="pay_item_id" value="10 1" />' in71 self.assertTrue('<input type="hidden" name="pay_item_id" value="102" />' in 75 72 self.browser.contents) 76 73 self.assertEqual(self.student.current_mode, 'ug_ft') 77 74 # 250 gateway charge have been added 78 75 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" />' in83 self.browser.contents) 84 self.assertTrue( 85 'item_name=" Tuition Plus (total amount)" item_amt="4000000" bank_id="117" acct_num="1011005811"' in76 self.assertEqual(payment.amount_auth, 7250) 77 self.assertEqual(payment.net_amt, 2000) 78 self.assertTrue( 79 '<input type="hidden" name="amount" value="725000" />' in 80 self.browser.contents) 81 self.assertTrue( 82 'item_name="Registration Fee" item_amt="200000" bank_id="117" acct_num="1011050158"' in 86 83 self.browser.contents) 87 84
Note: See TracChangeset for help on using the changeset viewer.