Changeset 13035 for main/waeup.aaue/trunk/src/waeup/aaue/students
- Timestamp:
- 5 Jun 2015, 08:25:11 (10 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r12504 r13035 19 19 import shutil 20 20 import tempfile 21 import pytz 21 22 import grok 23 from datetime import datetime, timedelta, date 22 24 from mechanize import LinkNotFoundError 23 25 from hurry.workflow.interfaces import IWorkflowState … … 255 257 'Add previous session payment ticket' in self.browser.contents) 256 258 return 259 260 def test_late_registration(self): 261 # Login 262 delta = timedelta(days=10) 263 self.app['configuration'][ 264 '2004'].coursereg_deadline = datetime.now(pytz.utc) - delta 265 IWorkflowState(self.student).setState('school fee paid') 266 self.browser.open(self.login_path) 267 self.browser.getControl(name="form.login").value = self.student_id 268 self.browser.getControl(name="form.password").value = 'spwd' 269 self.browser.getControl("Login").click() 270 self.browser.open(self.payments_path) 271 self.browser.open(self.payments_path + '/addop') 272 self.browser.getControl(name="form.p_category").value = ['late_registration'] 273 self.browser.getControl("Create ticket").click() 274 self.assertMatches('...ticket created...', 275 self.browser.contents) 276 self.browser.open(self.payments_path) 277 ctrl = self.browser.getControl(name='val_id') 278 value = ctrl.options[0] 279 self.browser.getLink("Study Course").click() 280 self.browser.getLink("Add course list").click() 281 self.assertMatches('...Add current level 100 (Year 1)...', 282 self.browser.contents) 283 self.browser.getControl("Create course list now").click() 284 self.browser.getLink("100").click() 285 self.browser.getLink("Edit course list").click() 286 self.browser.getControl("Register course list").click() 287 self.assertTrue('Course registration has ended. Please pay' in self.browser.contents) 288 self.student['payments'][value].approve() 289 self.browser.getControl("Register course list").click() 290 self.assertTrue('Course list has been registered' in self.browser.contents) 291 self.assertEqual(self.student.state, 'courses registered') 257 292 258 293 def deactivated_test_student_course_registration(self): -
main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
r12975 r13035 152 152 p_item = student['studycourse'].certificate.code 153 153 elif category == 'late_registration': 154 amount = academic_session.late_ fee154 amount = academic_session.late_registration_fee 155 155 elif category == 'schoolfee': 156 156 try:
Note: See TracChangeset for help on using the changeset viewer.