Changeset 9570 for main/waeup.uniben/trunk/src
- Timestamp:
- 7 Nov 2012, 17:22:50 (12 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
r9520 r9570 108 108 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 109 109 self.browser.getControl("Create ticket").click() 110 # Next session payment can't be made ... 111 self.assertMatches( 112 '...You have not yet paid your current/active session...', 113 self.browser.contents) 114 # current session payment must be approved first. 115 self.student['payments'][current_payment_key].approve() 116 self.browser.open(self.payments_path + '/addop') 117 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 118 self.browser.getControl("Create ticket").click() 110 111 ## Next session payment can't be made ... 112 #self.assertMatches( 113 # '...You have not yet paid your current/active session...', 114 # self.browser.contents) 115 ## current session payment must be approved first. 116 #self.student['payments'][current_payment_key].approve() 117 #self.browser.open(self.payments_path + '/addop') 118 #self.browser.getControl(name="form.p_category").value = ['schoolfee'] 119 #self.browser.getControl("Create ticket").click() 120 119 121 ctrl = self.browser.getControl(name='val_id') 120 122 value = ctrl.options[1] -
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r9522 r9570 296 296 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 297 297 self.browser.getControl("Create ticket").click() 298 self.assertMatches('...You have not yet paid your current/active session...', 299 self.browser.contents) 300 # Ok, let's pay the first schoolfee ticket. 301 schoolfee_ticket.approve() 302 self.browser.open(self.payments_path + '/addop') 303 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 304 self.browser.getControl("Create ticket").click() 298 299 300 #self.assertMatches('...You have not yet paid your current/active session...', 301 # self.browser.contents) 302 ## Ok, let's pay the first schoolfee ticket. 303 #schoolfee_ticket.approve() 304 #self.browser.open(self.payments_path + '/addop') 305 #self.browser.getControl(name="form.p_category").value = ['schoolfee'] 306 #self.browser.getControl("Create ticket").click() 307 308 305 309 self.assertMatches('...ticket created...', 306 310 self.browser.contents) … … 430 434 431 435 IWorkflowState(self.student).setState('returning') 432 error, payment = utils.setPaymentDetails('schoolfee', 433 self.student, None, None) 434 self.assertTrue( 435 u'You have not yet paid your current/active session.' in error) 436 # Ok, that means we have to add paid payment ticket first. 437 payment = createObject('waeup.StudentOnlinePayment') 438 payment.p_category = u'schoolfee' 439 payment.p_session = self.student.current_session 440 payment.p_item = u'My Certificate' 441 payment.p_id = u'anyid' 442 payment.p_state = u'paid' 443 self.student['payments']['anykey'] = payment 436 437 438 #error, payment = utils.setPaymentDetails('schoolfee', 439 # self.student, None, None) 440 #self.assertTrue( 441 # u'You have not yet paid your current/active session.' in error) 442 ## Ok, that means we have to add paid payment ticket first. 443 #payment = createObject('waeup.StudentOnlinePayment') 444 #payment.p_category = u'schoolfee' 445 #payment.p_session = self.student.current_session 446 #payment.p_item = u'My Certificate' 447 #payment.p_id = u'anyid' 448 #payment.p_state = u'paid' 449 #self.student['payments']['anykey'] = payment 450 451 444 452 error, payment = utils.setPaymentDetails('schoolfee', 445 453 self.student, None, None) -
main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
r9551 r9570 146 146 if academic_session == None: 147 147 return _(u'Session configuration object is not available.'), None 148 148 149 # Students are only allowed to pay for the next session 149 150 # if current session payment 150 151 # has really been made, i.e. payment object exists. 151 if not self._paymentMade( 152 student, student.current_session): 153 return _('You have not yet paid your current/active' + 154 ' session. Please use the previous session' + 155 ' payment form first.'), None 152 #if not self._paymentMade( 153 # student, student.current_session): 154 # return _('You have not yet paid your current/active' + 155 # ' session. Please use the previous session' + 156 # ' payment form first.'), None 157 156 158 if student.is_foreigner: 157 159 amount = getattr(certificate, 'school_fee_4', 0.0) … … 166 168 if academic_session == None: 167 169 return _(u'Session configuration object is not available.'), None 170 168 171 # Students are only allowed to pay for the next session 169 172 # if current session payment has really been made, 170 173 # i.e. payment object exists and is paid. 171 if not self._paymentMade( 172 student, student.current_session): 173 return _('You have not yet paid your current/active' + 174 ' session. Please use the previous session' + 175 ' payment form first.'), None 174 #if not self._paymentMade( 175 # student, student.current_session): 176 # return _('You have not yet paid your current/active' + 177 # ' session. Please use the previous session' + 178 # ' payment form first.'), None 179 176 180 if student.is_foreigner: 177 181 amount = getattr(certificate, 'school_fee_4', 0.0)
Note: See TracChangeset for help on using the changeset viewer.