Changeset 12978 for main/waeup.kwarapoly/trunk
- Timestamp:
- 21 May 2015, 20:50:04 (10 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
r12061 r12978 227 227 228 228 def update(self): 229 super(CustomInterswitchPageApplicant, self).update() 229 error = self.init_update() 230 if error: 231 self.flash(error, type='danger') 232 self.redirect(self.url(self.context, '@@index')) 233 return 230 234 xmldict = {} 231 235 provider_amt = 300.0 -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py
r12148 r12978 389 389 390 390 391 def test_interswitch_form_ticket_expired(self): 392 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 393 acc_payment = createObject('waeup.StudentOnlinePayment') 394 acc_payment.p_state = 'unpaid' 395 acc_payment.p_category = 'clearance' 396 acc_payment.p_id = 'xyz' 397 acc_payment.pay_item_id = '123' 398 acc_payment.amount_auth = 876.0 399 self.student['payments']['xyz'] = acc_payment 400 self.browser.open(self.payments_path + '/xyz') 401 self.browser.getLink("CollegePAY", index=0).click() 402 self.assertMatches('...<input type="hidden" name="pay_item_id" value="000" />...', 403 self.browser.contents) 404 self.assertMatches('...Total Amount Authorized:...', 405 self.browser.contents) 406 self.assertEqual(self.student.current_mode, 'nd_ft') 407 self.assertMatches( 408 '...<input type="hidden" name="amount" value="87600" />...', 409 self.browser.contents) 410 delta = timedelta(minutes=61) 411 acc_payment.creation_date -= delta 412 self.browser.open(self.payments_path + '/xyz') 413 self.browser.getLink("CollegePAY", index=0).click() 414 self.assertMatches( 415 '...This payment ticket is too old. Please create a new ticket...', 416 self.browser.contents) 417 delta = timedelta(minutes=2) 418 acc_payment.creation_date += delta 419 self.browser.open(self.payments_path + '/xyz') 420 self.browser.getLink("CollegePAY", index=0).click() 421 self.assertMatches('...Total Amount Authorized:...', 422 self.browser.contents) 423 391 424 @external_test 392 425 def test_webservice(self): … … 628 661 in self.browser.contents) 629 662 663 def test_interswitch_form_ticket_expired(self): 664 # Manager can access InterswitchForm 665 self.browser.getLink("CollegePAY", index=0).click() 666 self.assertMatches('...Total Amount Authorized:...', 667 self.browser.contents) 668 self.assertTrue( 669 '<input type="hidden" name="amount" value="333300" />' 670 in self.browser.contents) 671 self.assertTrue( 672 '<item_detail item_id="1" item_name="Application" ' 673 'item_amt="253300" bank_id="120" acct_num="1771440667" />' 674 in self.browser.contents) 675 delta = timedelta(minutes=61) 676 self.applicant.values()[0].creation_date -= delta 677 self.browser.open(self.payment_url) 678 self.browser.getLink("CollegePAY", index=0).click() 679 self.assertMatches( 680 '...This payment ticket is too old. Please create a new ticket...', 681 self.browser.contents) 682 630 683 def prepare_special_container(self): 631 684 # Add special application container
Note: See TracChangeset for help on using the changeset viewer.