Changeset 12977 for main/waeup.aaue/trunk/src/waeup
- Timestamp:
- 21 May 2015, 17:55:58 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r12975 r12977 66 66 self.assertMatches('...ticket created...', 67 67 self.browser.contents) 68 #ctrl = self.browser.getControl(name='val_id')69 #value = ctrl.options[0]70 68 #self.browser.getLink(value).click() 71 69 self.assertMatches('...Amount Authorized...', … … 76 74 self.payment_url = self.browser.url 77 75 78 79 76 def test_interswitch_form(self): 80 81 77 # Manager can access InterswitchForm 82 78 self.browser.getLink("CollegePAY", index=0).click() … … 85 81 self.assertMatches( 86 82 '...<input type="hidden" name="amount" value="100000" />...', 83 self.browser.contents) 84 delta = timedelta(minutes=61) 85 self.applicant.values()[0].creation_date -= delta 86 self.browser.open(self.payment_url) 87 self.browser.getLink("CollegePAY", index=0).click() 88 self.assertMatches( 89 '...This payment ticket is too old. Please create a new ticket...', 87 90 self.browser.contents) 88 91 … … 181 184 '...item_name="Acceptance Fee" item_amt="4280000" bank_id="117" acct_num="1014066976"...', 182 185 self.browser.contents) 186 187 def test_interswitch_form_ticket_expired(self): 188 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 189 acc_payment = createObject('waeup.StudentOnlinePayment') 190 acc_payment.p_state = 'unpaid' 191 acc_payment.p_category = 'clearance' 192 acc_payment.p_id = 'xyz' 193 acc_payment.pay_item_id = '123' 194 acc_payment.amount_auth = 876.0 195 self.student['payments']['xyz'] = acc_payment 196 self.browser.open(self.payments_path + '/xyz') 197 self.browser.getLink("CollegePAY", index=0).click() 198 self.assertMatches('...<input type="hidden" name="pay_item_id" value="104" />...', 199 self.browser.contents) 200 self.assertMatches('...Total Amount Authorized:...', 201 self.browser.contents) 202 self.assertEqual(self.student.current_mode, 'ug_ft') 203 self.assertMatches( 204 '...<input type="hidden" name="amount" value="87600" />...', 205 self.browser.contents) 206 delta = timedelta(minutes=61) 207 acc_payment.creation_date -= delta 208 self.browser.open(self.payments_path + '/xyz') 209 self.browser.getLink("CollegePAY", index=0).click() 210 self.assertMatches( 211 '...This payment ticket is too old. Please create a new ticket...', 212 self.browser.contents) 213 delta = timedelta(minutes=2) 214 acc_payment.creation_date += delta 215 self.browser.open(self.payments_path + '/xyz') 216 self.browser.getLink("CollegePAY", index=0).click() 217 self.assertMatches('...Total Amount Authorized:...', 218 self.browser.contents) 183 219 184 220 @external_test
Note: See TracChangeset for help on using the changeset viewer.