- Timestamp:
- 22 Oct 2012, 13:03:07 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/interswitch/tests.py
r9285 r9386 50 50 IWorkflowState(self.student).setState('cleared') 51 51 self.browser.open(self.payments_path + '/addop') 52 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 52 53 self.browser.getControl("Create ticket").click() 53 54 self.assertMatches('...Payment ticket created...', 54 55 self.browser.contents) 56 57 def test_interswitch_form(self): 58 # School fee ticket already created in setUp method 55 59 ctrl = self.browser.getControl(name='val_id') 56 60 value = ctrl.options[0] … … 63 67 self.payment_url = self.browser.url 64 68 65 def test_interswitch_form(self):66 67 69 # Manager can access InterswitchForm 68 70 self.browser.getLink("CollegePAY", index=0).click() 71 # The total amount to be processed by Interswitch 72 # has been reduced by the Interswitch fee of 150 Nairas 69 73 self.assertMatches('...Total Amount Authorized:...', 70 74 self.browser.contents) … … 72 76 '...<input type="hidden" name="amount" value="13150000.0" />...', 73 77 self.browser.contents) 78 self.assertMatches( 79 '...item_name="School Fee" item_amt="12970000" bank_id="89" acct_num="0030001000017110"...', 80 self.browser.contents) 81 self.assertMatches( 82 '...item_name="BT Education" item_amt="150000" bank_id="89" acct_num="0061001000021095"...', 83 self.browser.contents) 84 85 # Create clearance fee ticket 86 self.browser.open(self.payments_path + '/addop') 87 self.browser.getControl(name="form.p_category").value = ['clearance'] 88 self.browser.getControl("Create ticket").click() 89 self.assertMatches('...ticket created...', 90 self.browser.contents) 91 ctrl = self.browser.getControl(name='val_id') 92 value = ctrl.options[1] 93 self.browser.getLink(value).click() 94 self.assertMatches('...Amount Authorized...', 95 self.browser.contents) 96 self.assertMatches( 97 '...<span>20000.0</span>...', 98 self.browser.contents) 99 # Manager can access InterswitchForm 100 self.browser.getLink("CollegePAY", index=0).click() 101 self.assertMatches('...Total Amount Authorized:...', 102 self.browser.contents) 103 # The total amount to be processed by Interswitch 104 # has been reduced by the Interswitch fee of 150 Nairas 105 self.assertMatches('...Total Amount Authorized:...', 106 self.browser.contents) 107 self.assertMatches( 108 '...<input type="hidden" name="amount" value="2000000.0" />...', 109 self.browser.contents) 110 self.assertMatches( 111 '...item_name="Acceptance Fee" item_amt="1970000" bank_id="120" acct_num="1750005063"...', 112 self.browser.contents) 113 # BT does nor charge a fee for clearance 114 self.assertFalse("BT Education" in self.browser.contents) 115 74 116 75 117 @external_test
Note: See TracChangeset for help on using the changeset viewer.