- Timestamp:
- 13 May 2017, 16:50:36 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r14642 r14684 2578 2578 return 2579 2579 2580 def test_student_ticket_update(self): 2581 IWorkflowState(self.student).setState('school fee paid') 2582 self.student['studycourse'].current_level = 100 2583 self.browser.open(self.login_path) 2584 self.browser.getControl(name="form.login").value = self.student_id 2585 self.browser.getControl(name="form.password").value = 'spwd' 2586 self.browser.getControl("Login").click() 2587 # Now students can add the current study level 2588 self.browser.getLink("Study Course").click() 2589 self.browser.getLink("Add course list").click() 2590 self.assertMatches('...Add current level 100 (Year 1)...', 2591 self.browser.contents) 2592 self.browser.getControl("Create course list now").click() 2593 # A level with one course ticket was created 2594 self.assertEqual( 2595 self.student['studycourse']['100'].number_of_tickets, 1) 2596 self.browser.getLink("100").click() 2597 self.assertTrue('<td>Unnamed Course</td>' in self.browser.contents) 2598 self.browser.getLink("Edit course list").click() 2599 self.browser.getControl("Update all tickets").click() 2600 self.assertTrue('All course tickets updated.' in self.browser.contents) 2601 # ... nothing has changed 2602 self.assertTrue('<td>Unnamed Course</td>' in self.browser.contents) 2603 # We change the title of the course 2604 self.course.title = u'New Title' 2605 self.browser.getControl("Update all tickets").click() 2606 self.assertTrue('<td>New Title</td>' in self.browser.contents) 2607 # We remove the course 2608 del self.app['faculties']['fac1']['dep1'].courses['COURSE1'] 2609 self.browser.getControl("Update all tickets").click() 2610 self.assertTrue(' <td>New Title (course cancelled)</td>' 2611 in self.browser.contents) 2612 # Course ticket invalidation has been logged 2613 logfile = os.path.join( 2614 self.app['datacenter'].storage, 'logs', 'students.log') 2615 logcontent = open(logfile).read() 2616 self.assertTrue( 2617 'K1000000 - students.browser.StudyLevelEditFormPage - ' 2618 'K1000000 - course tickets invalidated: COURSE1' 2619 in logcontent) 2620 return 2621 2580 2622 def test_student_course_registration_outstanding(self): 2581 2623 self.course = createObject('waeup.Course')
Note: See TracChangeset for help on using the changeset viewer.