Changeset 6763 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 14 Sep 2011, 07:14:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6758 r6763 108 108 certificate.code = 'CERT1' 109 109 certificate.application_category = 'basic' 110 certificate.start_level = 100 111 certificate.end_level = 500 110 112 self.app['faculties']['fac1'] = Faculty() 111 113 self.app['faculties']['fac1']['dep1'] = Department() … … 249 251 self.browser.getLink("Manage").click() 250 252 self.assertTrue('Manage study course' in self.browser.contents) 253 # Before we can select a level, the certificate must be selected and saved 254 self.browser.getControl(name="form.certificate").value = ['CERT1'] 255 self.browser.getControl(name="form.current_session").value = ['2004'] 256 self.browser.getControl(name="form.current_verdict").value = ['A'] 257 self.browser.getControl("Save").click() 258 # Now we can save also the current level which depends on start and end 259 # level of the certificate 260 self.browser.getControl(name="form.current_level").value = ['100'] 261 self.browser.getControl("Save").click() 251 262 252 263 self.browser.open(self.student_path) … … 266 277 self.assertMatches('...Student admitted by zope.mgr...', 267 278 self.browser.contents) 279 280 # Managers can pass through the whole workflow 281 student = self.app['students'][self.test_student_id] 282 self.browser.open(self.manage_student_path) 283 self.assertTrue(student.clearance_locked) 284 self.browser.getControl(name="transition").value = ['start_clearance'] 285 self.browser.getControl("Save").click() 286 self.assertFalse(student.clearance_locked) 287 self.browser.getControl(name="transition").value = ['request_clearance'] 288 self.browser.getControl("Save").click() 289 self.assertTrue(student.clearance_locked) 290 self.browser.getControl(name="transition").value = ['clear'] 291 self.browser.getControl("Save").click() 292 self.browser.getControl(name="transition").value = ['pay_first_school_fee'] 293 self.browser.getControl("Save").click() 294 self.browser.getControl(name="transition").value = ['reset6'] 295 self.browser.getControl("Save").click() 296 # The pay_school_fee transition triggers some changes 297 self.browser.getControl(name="transition").value = ['pay_school_fee'] 298 self.browser.getControl("Save").click() 299 self.assertEqual(student['studycourse'].current_session, 2005) # was 2004 300 self.assertEqual(student['studycourse'].current_level, 200) # was 100 301 self.assertEqual(student['studycourse'].current_verdict, '') # was 'A' 302 self.assertEqual(student['studycourse'].previous_verdict, 'A') # was empty 268 303 return 269 304
Note: See TracChangeset for help on using the changeset viewer.