- Timestamp:
- 22 Oct 2012, 11:56:06 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
r9006 r9384 51 51 self.student.nationality = u'NG' 52 52 self.browser.open(self.payments_path + '/addop') 53 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 53 54 self.browser.getControl("Create ticket").click() 54 55 self.assertMatches('...ticket created...', … … 57 58 value = ctrl.options[0] 58 59 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.url65 60 66 61 … … 78 73 def test_interswitch_form(self): 79 74 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 80 82 # Manager can access InterswitchForm 81 83 self.browser.getLink("CollegePAY", index=0).click() … … 84 86 # The total amount to be processed by Interswitch 85 87 # has been reduced by the Interswitch fee of 150 Nairas 88 self.assertMatches('...Total Amount Authorized:...', 89 self.browser.contents) 86 90 self.assertMatches( 87 91 '...<input type="hidden" name="amount" value="4000000.0" />...', 88 92 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 89 132 90 133 # @external_test
Note: See TracChangeset for help on using the changeset viewer.