Changeset 11451 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 27 Feb 2014, 09:46:40 (11 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r11440 r11451 1028 1028 self.assertEqual(ac.owner, self.student_id) 1029 1029 self.assertEqual(ac.cost, 4567.0) 1030 return 1031 1032 def test_payment_disabled(self): 1033 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1034 self.browser.open(self.payments_path) 1035 IWorkflowState(self.student).setState('cleared') 1036 self.browser.getLink("Add current session payment ticket").click() 1037 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 1038 self.browser.getControl("Create ticket").click() 1039 self.assertMatches('...ticket created...', 1040 self.browser.contents) 1041 self.app['configuration']['2004'].payment_disabled = ['sf_all'] 1042 self.browser.getLink("Add current session payment ticket").click() 1043 self.browser.getControl(name="form.p_category").value = ['schoolfee'] 1044 self.browser.getControl("Create ticket").click() 1045 self.assertMatches('...Payment temporarily disabled...', 1046 self.browser.contents) 1030 1047 return 1031 1048 -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r10803 r11451 335 335 except KeyError: 336 336 return None 337 338 def _isPaymentDisabled(self, p_session, category, student): 339 academic_session = self._getSessionConfiguration(p_session) 340 if 'sf_all' in academic_session.payment_disabled: 341 return True 342 return False 337 343 338 344 def setPaymentDetails(self, category, student, … … 442 448 ticket.p_session == p_session: 443 449 return _('This type of payment has already been made.'), None 450 if self._isPaymentDisabled(p_session, category, student): 451 return _('Payment temporarily disabled.'), None 444 452 payment = createObject(u'waeup.StudentOnlinePayment') 445 453 timestamp = ("%d" % int(time()*10000))[1:]
Note: See TracChangeset for help on using the changeset viewer.