Changeset 11682 for main/waeup.kwarapoly/trunk/src/waeup/kwarapoly
- Timestamp:
- 10 Jun 2014, 11:52:31 (11 years ago)
- Location:
- main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py
r11677 r11682 244 244 provider_amt = 300.0 245 245 dalash_amt = 200.0 246 gateway_amt = GATEWAY_AMT 246 247 if self.applicant.applicant_id.startswith('hnd'): 247 248 xmldict['institution_acct'] = '1771440667' … … 341 342 xmldict['provider_item_name'] = PROVIDER_ITEM_NAME 342 343 xmldict['institution_amt'] = 100 * ( 343 self.context.amount_auth - provider_amt - GATEWAY_AMT- dalash_amt)344 xmldict['institution_item_name'] = self.c ontext.p_category344 self.context.amount_auth - provider_amt - gateway_amt - dalash_amt) 345 xmldict['institution_item_name'] = self.category 345 346 xmldict['institution_name'] = INSTITUTION_NAME 346 347 … … 374 375 self.xml_data = """<input type="hidden" name="xml_data" value='%s' />""" % xmltext 375 376 self.context.provider_amt = provider_amt 376 self.context.gateway_amt = GATEWAY_AMT377 self.context.gateway_amt = gateway_amt 377 378 self.context.thirdparty_amt = dalash_amt 378 379 return -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r11677 r11682 371 371 self.assertEqual(self.student['payments'][value].thirdparty_amt, 200.0) 372 372 373 self.app['configuration']['2004'].loss_idcard_fee = 3000.0 374 self.browser.open(self.payments_path + '/addop') 375 self.browser.getControl(name="form.p_category").value = ['loss_idcard'] 376 self.browser.getControl("Create ticket").click() 377 ctrl = self.browser.getControl(name='val_id') 378 value = ctrl.options[6] 379 self.browser.getLink(value).click() 380 self.assertMatches('...Amount Authorized...', self.browser.contents) 381 self.assertMatches( 382 '...<span>3000.0</span>...', self.browser.contents) 383 self.payment_url = self.browser.url 384 self.browser.getLink("CollegePAY", index=0).click() 385 self.assertEqual(self.student['payments'][value].amount_auth, 3000.0) 386 self.assertEqual(self.student['payments'][value].provider_amt, 9.0) 387 self.assertEqual(self.student['payments'][value].gateway_amt, 15.0) 388 self.assertEqual(self.student['payments'][value].thirdparty_amt, 6.0) 389 390 373 391 @external_test 374 392 def test_webservice(self): … … 511 529 in self.browser.contents) 512 530 self.assertTrue( 513 '<item_detail item_id="1" item_name=" application" '531 '<item_detail item_id="1" item_name="Application Fee" ' 514 532 'item_amt="253300" bank_id="120" acct_num="1771440667" />' 515 533 in self.browser.contents) … … 523 541 self.browser.getLink("CollegePAY", index=0).click() 524 542 self.assertTrue( 525 '<item_detail item_id="1" item_name=" application" '543 '<item_detail item_id="1" item_name="Application Fee" ' 526 544 'item_amt="253300" bank_id="120" acct_num="1771440667" />' 527 545 in self.browser.contents) … … 544 562 self.browser.getLink("CollegePAY", index=0).click() 545 563 self.assertTrue( 546 '<item_detail item_id="1" item_name=" application" '564 '<item_detail item_id="1" item_name="Application Fee" ' 547 565 'item_amt="303300" bank_id="8" acct_num="2013910271" />' 548 566 in self.browser.contents) … … 559 577 self.browser.getLink("CollegePAY", index=0).click() 560 578 self.assertTrue( 561 '<item_detail item_id="1" item_name=" application" '579 '<item_detail item_id="1" item_name="Application Fee" ' 562 580 'item_amt="303300" bank_id="10" acct_num="0106259811" />' 563 581 in self.browser.contents) … … 606 624 self.browser.getLink("CollegePAY", index=0).click() 607 625 self.assertTrue( 608 '<item_detail item_id="1" item_name=" transcript_local" '626 '<item_detail item_id="1" item_name="ND Transcript (local)" ' 609 627 'item_amt="450000" bank_id="9" acct_num="7000016724" />' 610 628 in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.