Changeset 9515
- Timestamp:
- 3 Nov 2012, 08:57:35 (12 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
r9460 r9515 263 263 xmldict['institution_bank_id'] = '7' 264 264 xmldict['institution_acct'] = '1003475516' 265 if self.context.p_category == 'gown': 266 self.pay_item_id = '5704' 267 provider_amt = 0 268 xmldict['institution_bank_id'] = '7' 269 xmldict['institution_acct'] = '1016232382' 265 270 266 271 xmldict['provider_amt'] = 100 * provider_amt … … 270 275 self.context.amount_auth - provider_amt - 150) 271 276 # Interswitch amount is not part of the xml data 272 xmltext = """<payment_item_detail> 277 if provider_amt == 0: 278 xmltext = """<payment_item_detail> 279 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 280 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> 281 </item_details> 282 </payment_item_detail>""" % xmldict 283 else: 284 xmltext = """<payment_item_detail> 273 285 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 274 286 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" /> -
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
r9460 r9515 148 148 self.browser.contents) 149 149 150 # Create gown fee ticket 151 configuration.maint_fee = 987.0 152 self.app['configuration']['2004'].gown_fee = 234.0 153 self.browser.open(self.payments_path + '/addop') 154 self.browser.getControl(name="form.p_category").value = ['gown'] 155 self.browser.getControl("Create ticket").click() 156 ctrl = self.browser.getControl(name='val_id') 157 value = ctrl.options[3] 158 self.browser.getLink(value).click() 159 self.assertMatches( 160 '...<span>234.0</span>...', 161 self.browser.contents) 162 # Manager can access InterswitchForm 163 self.browser.getLink("CollegePAY", index=0).click() 164 self.assertMatches('...<input type="hidden" name="pay_item_id" value="5704" />...', 165 self.browser.contents) 166 self.assertMatches('...Total Amount Authorized:...', 167 self.browser.contents) 168 self.assertMatches( 169 '...<input type="hidden" name="amount" value="23400.0" />...', 170 self.browser.contents) 171 self.assertMatches( 172 '...<item_detail item_id="1" item_name="Gown Hire Fee" item_amt="8400" bank_id="7" acct_num="1016232382" />...', 173 self.browser.contents) 174 self.assertFalse( 175 'item_name="BT Education"' in self.browser.contents) 150 176 151 177 # @external_test
Note: See TracChangeset for help on using the changeset viewer.