- Timestamp:
- 3 Oct 2012, 07:08:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r9251 r9281 487 487 self.assertMatches('...has been saved...', self.browser.contents) 488 488 self.assertEqual(self.student.current_level, 200) 489 490 def test_postgraduate_student_access(self): 491 self.certificate.study_mode = 'special_pg_pt' 492 self.certificate.start_level = 700 493 self.certificate.end_level = 800 494 self.student['studycourse'].current_level = 700 495 IWorkflowState(self.student).setState('school fee paid') 496 self.browser.open(self.login_path) 497 self.browser.getControl(name="form.login").value = self.student_id 498 self.browser.getControl(name="form.password").value = 'spwd' 499 self.browser.getControl("Login").click() 500 self.assertTrue( 501 'You logged in.' in self.browser.contents) 502 # Now students can add the current study level 503 self.browser.getLink("Study Course").click() 504 self.browser.getLink("Add course list").click() 505 self.assertMatches('...Add current level 700...', 506 self.browser.contents) 507 self.browser.getControl("Create course list now").click() 508 # A level with one course ticket was created 509 self.assertEqual(self.student['studycourse']['700'].number_of_tickets, 0) 510 self.browser.getLink("700").click() 511 self.browser.getLink("Edit course list").click() 512 self.browser.getControl("Add course ticket").click() 513 self.browser.getControl(name="form.course").value = ['COURSE1'] 514 self.browser.getControl("Add course ticket").click() 515 self.assertMatches('...Successfully added COURSE1...', 516 self.browser.contents) 517 # Special postgraduate students can register course lists 518 self.browser.getControl("Register course list").click() 519 self.assertMatches('...Course list has been registered...', 520 self.browser.contents) 521 self.assertEqual(self.student.state, 'courses registered') 522 return
Note: See TracChangeset for help on using the changeset viewer.