Changeset 14259 for main/waeup.aaue/trunk/src/waeup/aaue/students/tests
- Timestamp:
- 5 Nov 2016, 05:59:51 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r14252 r14259 831 831 return 832 832 833 def test_student_GST_registration(self): 834 configuration_1 = createObject('waeup.SessionConfiguration') 835 configuration_1.academic_session = 2015 836 configuration_1.gst_registration_1_fee = 3333.0 837 configuration_1.gst_text_book_1_fee = 4444.0 838 self.app['configuration'].addSessionConfiguration(configuration_1) 839 course = createObject('waeup.Course') 840 course.code = 'GST101' 841 course.semester = 1 842 course.credits = 10 843 course.passmark = 40 844 self.app['faculties']['fac1']['dep1'].courses.addCourse( 845 course) 846 self.app['faculties']['fac1']['dep1'].certificates[ 847 'CERT1'].addCertCourse(course, level=100) 848 IWorkflowState(self.student).setState('school fee paid') 849 self.student['studycourse'].entry_session = 2015 850 self.student['studycourse'].current_session = 2015 851 self.course.semester = 2 852 self.browser.open(self.login_path) 853 self.browser.getControl(name="form.login").value = self.student_id 854 self.browser.getControl(name="form.password").value = 'spwd' 855 self.browser.getControl("Login").click() 856 self.browser.getLink("Study Course").click() 857 self.browser.getLink("Add course list").click() 858 self.browser.getControl("Create course list now").click() 859 self.assertFalse('GST101' in self.browser.contents) 860 # GST101 tickets can't be added manually 861 self.browser.getLink("Edit course list").click() 862 self.browser.getLink("here").click() 863 self.browser.getControl(name="form.course").value = ['GST101'] 864 self.browser.getControl("Add course ticket").click() 865 self.assertTrue( 866 'GST101 can only be added if both registration fee and text' 867 in self.browser.contents) 868 # GST fees have to be paid first 869 self.browser.open(self.payments_path + '/addop') 870 self.browser.getControl(name="form.p_category").value = ['gst_registration_1'] 871 self.browser.getControl("Create ticket").click() 872 self.student['payments'].values()[0].approve() 873 self.browser.open(self.studycourse_path + '/100/ctadd') 874 self.browser.getControl(name="form.course").value = ['GST101'] 875 self.browser.getControl("Add course ticket").click() 876 self.assertTrue( 877 'GST101 can only be added if both registration fee and text' 878 in self.browser.contents) 879 self.browser.open(self.payments_path + '/addop') 880 self.browser.getControl(name="form.p_category").value = ['gst_text_book_1'] 881 self.browser.getControl("Create ticket").click() 882 self.student['payments'].values()[1].approve() 883 self.browser.open(self.studycourse_path + '/100/ctadd') 884 self.browser.getControl(name="form.course").value = ['GST101'] 885 self.browser.getControl("Add course ticket").click() 886 self.assertTrue('Successfully added GST101' in self.browser.contents) 887 return 888 833 889 def test_course_registration_forbidden(self): 834 890 IWorkflowState(self.student).setState('school fee paid')
Note: See TracChangeset for help on using the changeset viewer.