Changeset 15986 for main/waeup.kofa/trunk/src/waeup/kofa/students/tests
- Timestamp:
- 4 Feb 2020, 18:33:48 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r15972 r15986 2834 2834 return 2835 2835 2836 def test_student_course_already_passed(self): 2837 IWorkflowState(self.student).setState('school fee paid') 2838 self.student['studycourse'].current_level = 100 2839 self.browser.open(self.login_path) 2840 self.browser.getControl(name="form.login").value = self.student_id 2841 self.browser.getControl(name="form.password").value = 'spwd' 2842 self.browser.getControl("Login").click() 2843 # Now students can add the current study level 2844 self.browser.getLink("Study Course").click() 2845 self.browser.getLink("Add course list").click() 2846 self.assertMatches('...Add current level 100 (Year 1)...', 2847 self.browser.contents) 2848 self.browser.getControl("Create course list now").click() 2849 # A level with one course ticket was created 2850 self.assertEqual(self.student['studycourse']['100'].number_of_tickets, 1) 2851 # We set the score above the passmark 2852 self.student['studycourse']['100'][ 2853 'COURSE1'].score = self.student['studycourse']['100'][ 2854 'COURSE1'].passmark + 1 2855 # We add a second level 2856 self.student['studycourse'].current_level = 200 2857 self.browser.getLink("Study Course").click() 2858 self.browser.getLink("Add course list").click() 2859 self.assertMatches('...Add current level 200 (Year 2)...', 2860 self.browser.contents) 2861 self.browser.getControl("Create course list now").click() 2862 self.browser.getLink("200").click() 2863 self.browser.getLink("Edit course list").click() 2864 self.browser.getLink("here").click() 2865 self.browser.getControl(name="form.course").value = ['COURSE1'] 2866 self.browser.getControl("Add course ticket").click() 2867 self.assertTrue( 2868 'Course has already been passed at previous level' 2869 in self.browser.contents) 2870 self.assertEqual(self.student['studycourse']['200'].number_of_tickets, 0) 2871 # We set the score below the passmark 2872 self.student['studycourse']['100'][ 2873 'COURSE1'].score = self.student['studycourse']['100'][ 2874 'COURSE1'].passmark - 1 2875 self.browser.getControl("Add course ticket").click() 2876 self.assertTrue( 2877 'Successfully added COURSE1' in self.browser.contents) 2878 self.assertEqual(self.student['studycourse']['200'].number_of_tickets, 1) 2879 return 2880 2836 2881 def test_student_course_registration_outstanding(self): 2837 2882 self.course = createObject('waeup.Course')
Note: See TracChangeset for help on using the changeset viewer.