Changeset 7891 for main/waeup.custom/trunk/src
- Timestamp:
- 16 Mar 2012, 07:15:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.custom/trunk/src/waeup/custom/students/tests.py
r7890 r7891 130 130 self.assertMatches('...Amount Authorized...', 131 131 self.browser.contents) 132 payment_url = self.browser.url 133 134 # Manager can access InterswitchForm 135 self.browser.getLink("CollegePAY", index=0).click() 136 self.assertMatches('...Total Amount Authorized:...', 137 self.browser.contents) 138 self.assertMatches( 139 '...<input type="hidden" name="amount" value="4000000" />...', 140 self.browser.contents) 141 142 # Manager receives valid callback 143 #self.browser.open(payment_url) 144 #self.browser.getLink("Request CollegePAY callback").click() 145 146 self.browser.open(self.callback_url(payment_url, 'XX', '300')) 147 self.assertMatches('...Unsuccessful callback: Something went wrong...', 148 self.browser.contents) 149 self.assertMatches('...Failed...', 150 self.browser.contents) 151 self.browser.open(self.payments_student_path + '/addop') 152 self.browser.getControl("Create ticket").click() 153 ctrl = self.browser.getControl(name='val_id') 154 self.browser.open(payment_url + '/callback') 155 self.assertMatches('...Unsuccessful callback: Incomplete query string...', 156 self.browser.contents) 157 self.assertMatches('...Failed...', 158 self.browser.contents) 159 self.browser.open(self.callback_url(payment_url, '00', '300')) 160 self.assertMatches('...Valid callback received...', 161 self.browser.contents) 162 self.browser.open(self.manage_student_path) 163 self.browser.getControl( 164 name="transition").value = ['pay_first_school_fee'] 165 self.browser.getControl("Save").click() 166 # Reset to returning 167 self.browser.getControl(name="transition").value = ['reset6'] 168 self.browser.getControl("Save").click() 132 # Set ticket paid 133 ticket = self.student['payments'].items()[0][1] 134 ticket.p_state = 'paid' 135 IWorkflowState(self.student).setState('returning') 169 136 self.browser.open(self.payments_student_path + '/addop') 170 137 self.browser.getControl("Create ticket").click()
Note: See TracChangeset for help on using the changeset viewer.