Changeset 9611 for main/waeup.fceokene/trunk/src/waeup/fceokene
- Timestamp:
- 10 Nov 2012, 21:02:02 (12 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_browser.py
r9525 r9611 253 253 self.assertEqual(error, None) 254 254 255 self.student['studycourse'].current_session = 2005 255 256 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 257 self.assertEqual(payment, None) 258 self.assertEqual(error, 'You have not yet booked accommodation.') 259 self.student['studycourse'].current_session = 2004 260 261 error, payment = utils.setPaymentDetails('hostel_maintenance',self.student) 256 262 self.assertEqual(payment.p_level, 100) 257 263 self.assertEqual(payment.p_session, 2004) 258 264 self.assertEqual(payment.amount_auth, 180.0) 259 self.assertEqual(payment.p_item, u' ')265 self.assertEqual(payment.p_item, u'My bed coordinates') 260 266 self.assertEqual(error, None) 261 267 -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r9525 r9611 82 82 amount = academic_session.booking_fee 83 83 elif category == 'hostel_maintenance': 84 current_session = student['studycourse'].current_session 85 bedticket = student['accommodation'].get(str(current_session), None) 86 if bedticket is not None and bedticket.bed is not None: 87 p_item = bedticket.bed_coordinates 88 else: 89 return _(u'You have not yet booked accommodation.'), None 90 acc_details = self.getAccommodationDetails(student) 91 if current_session != acc_details['booking_session']: 92 return _(u'Current session does not match accommodation session.'), None 84 93 amount = academic_session.maint_fee 85 94 elif category == 'clearance':
Note: See TracChangeset for help on using the changeset viewer.