Changeset 14556 for main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Timestamp:
- 17 Feb 2017, 16:27:53 (8 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py
r13614 r14556 2 2 import grok 3 3 from waeup.kofa.testing import FunctionalTestCase 4 from zope.component import getUtility 4 from hurry.workflow.interfaces import IWorkflowState 5 from zope.component import getUtility, createObject 5 6 from waeup.kofa.students.interfaces import IStudentsUtils 6 7 from waeup.kofa.students.tests.test_browser import StudentsFullSetup … … 41 42 max_credits = students_utils.maxCreditsExceeded(studylevel, course) 42 43 self.assertEqual(max_credits, 58) 44 return 45 46 def test_set_payment_details(self): 47 self.certificate.end_level = 300 48 self.student['studycourse'].current_verdict = 'B' 49 self.student['studycourse'].current_level = 300 50 configuration = createObject('waeup.SessionConfiguration') 51 configuration.academic_session = 2005 52 self.app['configuration'].addSessionConfiguration(configuration) 53 self.app['configuration']['2005'].penalty_nce_ft = 99.0 54 self.student['studycourse'].certificate.study_mode = 'nce_ft' 55 utils = getUtility(IStudentsUtils) 56 error, payment = utils.setPaymentDetails('schoolfee',self.student) 57 IWorkflowState(self.student).setState('returning') 58 error, payment = utils.setPaymentDetails('schoolfee',self.student) 59 self.assertEqual(payment.amount_auth, 12224.0) # 11975 + 150 + 99 60 self.student['studycourse'].previous_verdict = 'O' 61 error, payment = utils.setPaymentDetails('schoolfee',self.student) 62 self.assertEqual(payment.amount_auth, 12125.0) # 11975 + 150 63 return -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r14379 r14556 282 282 amount += academic_session.penalty_ug_ft 283 283 elif category == 'schoolfee' and student.current_mode in ( 284 'nce_ft',) :284 'nce_ft',) and student['studycourse'].previous_verdict != 'O': 285 285 amount += academic_session.penalty_nce_ft 286 286 elif category == 'schoolfee' and student.current_mode in (
Note: See TracChangeset for help on using the changeset viewer.