Changeset 9410
- Timestamp:
- 25 Oct 2012, 04:10:15 (12 years ago)
- Location:
- main/waeup.futminna/trunk/src/waeup/futminna/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/interswitch/browser.py
r9409 r9410 263 263 self.pay_item_id = "11706" 264 264 265 elif self.context.p_category == 'hostel_maintenance':265 elif 'maintenance' in self.context.p_category: 266 266 xmldict['institution_amt'] = 100 * ( 267 267 self.context.amount_auth - 300) 268 xmldict['institution_acct'] = "0000000000000" 269 xmldict['institution_bank_id'] = '00' 270 self.pay_item_id = "0000" 271 272 elif self.context.p_category == 'block_h_maintenance': 273 xmldict['institution_amt'] = 100 * ( 274 self.context.amount_auth - 300) 275 xmldict['institution_acct'] = "0000000000000" 276 xmldict['institution_bank_id'] = '00' 277 self.pay_item_id = "0000" 268 xmldict['institution_acct'] = "2018856637" 269 xmldict['institution_bank_id'] = '8' 270 self.pay_item_id = "11705" 278 271 279 272 xmldict['institution_name'] = INSTITUTION_NAME … … 298 291 xmltext = """<payment_item_detail> 299 292 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 300 <item_detail item_id="1" item_name=" Maintenance Fee" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />293 <item_detail item_id="1" item_name="Hostel Maintenance Fee" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 301 294 </item_details> 302 295 </payment_item_detail>""" % xmldict -
main/waeup.futminna/trunk/src/waeup/futminna/interswitch/tests.py
r9386 r9410 99 99 # Manager can access InterswitchForm 100 100 self.browser.getLink("CollegePAY", index=0).click() 101 self.assertMatches('...Total Amount Authorized:...',102 self.browser.contents)103 101 # The total amount to be processed by Interswitch 104 102 # has been reduced by the Interswitch fee of 150 Nairas … … 114 112 self.assertFalse("BT Education" in self.browser.contents) 115 113 114 # Create hostel maintenance ticket 115 self.browser.open(self.payments_path + '/addop') 116 self.browser.getControl(name="form.p_category").value = ['hostel_maintenance'] 117 self.browser.getControl("Create ticket").click() 118 self.assertMatches('...ticket created...', 119 self.browser.contents) 120 ctrl = self.browser.getControl(name='val_id') 121 value = ctrl.options[2] 122 self.browser.getLink(value).click() 123 self.assertMatches('...Amount Authorized...', 124 self.browser.contents) 125 self.assertMatches( 126 '...<span>10000.0</span>...', 127 self.browser.contents) 128 # Manager can access InterswitchForm 129 self.browser.getLink("CollegePAY", index=0).click() 130 # The total amount to be processed by Interswitch 131 # has been reduced by the Interswitch fee of 150 Nairas 132 self.assertMatches('...Total Amount Authorized:...', 133 self.browser.contents) 134 self.assertMatches( 135 '...<input type="hidden" name="amount" value="1000000.0" />...', 136 self.browser.contents) 137 self.assertMatches( 138 '...item_name="Hostel Maintenance Fee" item_amt="970000" bank_id="8" acct_num="2018856637"...', 139 self.browser.contents) 140 # BT does nor charge a fee for clearance 141 self.assertFalse("BT Education" in self.browser.contents) 142 116 143 117 144 @external_test
Note: See TracChangeset for help on using the changeset viewer.