Changeset 12976 for main/waeup.fceokene
- Timestamp:
- 21 May 2015, 17:36:58 (10 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/browser.py
r12799 r12976 156 156 157 157 def update(self): 158 super(CustomInterswitchPageApplicant, self).update() 158 error = self.init_update() 159 if error: 160 self.flash(error, type='danger') 161 self.redirect(self.url(self.context, '@@index')) 162 return 159 163 xmldict = {} 160 164 # Provider data -
main/waeup.fceokene/trunk/src/waeup/fceokene/interswitch/tests.py
r12662 r12976 17 17 ## 18 18 import os 19 from datetime import datetime 19 from datetime import datetime, timedelta, date 20 20 from zope.component import getUtility 21 21 from zope.catalog.interfaces import ICatalog … … 67 67 '<span>14975.0</span>' in self.browser.contents) 68 68 self.payment_url = self.browser.url 69 self.payment = self.student['payments'][self.value] 69 70 70 71 … … 245 246 self.assertFalse("BT Education" in self.browser.contents) 246 247 248 def test_interswitch_form_ticket_expired(self): 249 # Manager can access InterswitchForm 250 self.browser.getLink("CollegePAY", index=0).click() 251 self.assertMatches('...<input type="hidden" name="pay_item_id" value="8302" />...', 252 self.browser.contents) 253 self.assertMatches('...Total Amount Authorized:...', 254 self.browser.contents) 255 self.assertEqual(self.student.current_mode, 'nce_ft') 256 self.assertMatches( 257 '...<input type="hidden" name="amount" value="4000000" />...', 258 self.browser.contents) 259 delta = timedelta(minutes=61) 260 self.payment.creation_date -= delta 261 self.browser.open(self.payment_url) 262 self.browser.getLink("CollegePAY", index=0).click() 263 self.assertMatches( 264 '...This payment ticket is too old. Please create a new ticket...', 265 self.browser.contents) 266 delta = timedelta(minutes=2) 267 self.payment.creation_date += delta 268 self.browser.open(self.payment_url) 269 self.browser.getLink("CollegePAY", index=0).click() 270 self.assertMatches('...Total Amount Authorized:...', 271 self.browser.contents) 272 247 273 # @external_test 248 274 # def test_callback(self): … … 376 402 ' item_amt="35000" bank_id="117" acct_num="1013780934" />' 377 403 in self.browser.contents) 404 delta = timedelta(minutes=61) 405 self.applicant[self.value].creation_date -= delta 406 self.browser.open(self.payment_url) 407 self.browser.getLink("CollegePAY", index=0).click() 408 self.assertMatches( 409 '...This payment ticket is too old. Please create a new ticket...', 410 self.browser.contents) 378 411 379 412 @external_test
Note: See TracChangeset for help on using the changeset viewer.