Changeset 13799 for main/waeup.aaue/trunk
- Timestamp:
- 5 Apr 2016, 05:48:39 (9 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/etranzact
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/browser.py
r13784 r13799 158 158 self.output = ERROR_PART1 + 'Not a postgrad student' + ERROR_PART2 159 159 return 160 if student and '-PG' not in PAYMENT_TYPE and student.is_postgrad: 160 if student and '-PG' not in PAYMENT_TYPE and student.is_postgrad \ 161 and results[0].p_item != 'Balance': 161 162 self.output = ERROR_PART1 + 'Postgrad student' + ERROR_PART2 162 163 return -
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py
r13784 r13799 144 144 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Wrong PAYMENT_TYPE' + ERROR_PART2) 145 145 146 # Change payment state 146 147 self.student['payments'][self.p_id].p_state = 'paid' 148 147 149 self.browser.open( 148 150 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-NEW' … … 150 152 self.assertEqual(self.browser.contents, ERROR_PART1 + 'PAYEE_ID already used' + ERROR_PART2) 151 153 154 # Change workflow state and payment state 152 155 IWorkflowState(self.student).setState('returning') 153 156 self.student['payments'][self.p_id].p_state = 'unpaid' 157 154 158 self.browser.open( 155 159 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-NEW' … … 161 165 % self.p_id) 162 166 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Not a balance payment' + ERROR_PART2) 167 168 # Change payment item 163 169 self.payment.p_item = u'Balance' 170 164 171 self.browser.open( 165 172 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-PLUS-RETURNING' 166 173 % self.p_id) 167 174 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Balance payment' + ERROR_PART2) 175 176 # Change study mode 177 self.certificate.study_mode = 'special_pg_ft' 178 179 self.browser.open( 180 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-BALANCE' 181 % self.p_id) 182 self.assertEqual(self.browser.contents, 183 'PayeeName=Anna Tester~' 184 'Faculty=fac1~' 185 'Department=dep1~' 186 'Level=100~' 187 'ProgrammeType=Balance~' 188 'StudyType=special_pg_ft~' 189 'Session=2004/2005~' 190 'PayeeID=%s~' 191 'Amount=1234.0~' 192 'FeeStatus=unpaid~' 193 'Semester=N/A~' 194 'PaymentType=School Fee Plus~' 195 'MatricNumber=E1000000~' 196 'Email=aa@aa.ng~' 197 'PhoneNumber=1234' % self.p_id) 198 199 # Change payment item 168 200 self.payment.p_item = u'CERT1' 169 201 202 self.browser.open( 203 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-PLUS-RETURNING' 204 % self.p_id) 205 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Postgrad student' + ERROR_PART2) 206 207 # Cange payment category and study mode 170 208 self.payment.p_category = 'schoolfee' 171 self.certificate.study_mode = 'special_pg_ft'172 self.browser.open(173 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-RETURNING'174 % self.p_id)175 self.assertEqual(self.browser.contents, ERROR_PART1 + 'Postgrad student' + ERROR_PART2)176 177 209 self.certificate.study_mode = 'ug_ft' 210 178 211 self.browser.open( 179 212 'http://localhost/app/feerequest?PAYEE_ID=%s&PAYMENT_TYPE=SCHOOL-FEE-RETURNING'
Note: See TracChangeset for help on using the changeset viewer.