Ignore:
Timestamp:
2 Nov 2016, 11:34:48 (8 years ago)
Author:
Henrik Bettermann
Message:

Replace course_registration_allowed by course_registration_forbidden.

Add further requirement for registering courses.

Shorten setPaymentDetails.

Add further payment categories.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r14246 r14248  
    831831        return
    832832
     833    def test_course_registration_forbidden(self):
     834        IWorkflowState(self.student).setState('school fee paid')
     835        self.student['studycourse'].entry_session = 2016
     836        self.student['studycourse'].current_session = 2016
     837        self.browser.open(self.login_path)
     838        self.browser.getControl(name="form.login").value = self.student_id
     839        self.browser.getControl(name="form.password").value = 'spwd'
     840        self.browser.getControl("Login").click()
     841        self.browser.getLink("Study Course").click()
     842        self.browser.getLink("Add course list").click()
     843        self.browser.getControl("Create course list now").click()
     844        self.browser.getLink("Edit course list").click()
     845        self.browser.getControl("Register course list").click()
     846        self.assertTrue('Please pay faculty and departmental dues first'
     847            in self.browser.contents)
     848
     849        configuration_1 = createObject('waeup.SessionConfiguration')
     850        configuration_1.academic_session = 2016
     851        configuration_1.fac_dep_fee = 9999.0
     852        self.app['configuration'].addSessionConfiguration(configuration_1)
     853
     854        self.browser.open(self.payments_path + '/addop')
     855        self.browser.getControl(name="form.p_category").value = ['fac_dep']
     856        self.browser.getControl("Create ticket").click()
     857        self.student['payments'].values()[0].approveStudentPayment()
     858        self.browser.open(self.studycourse_path + '/100/edit')
     859        self.browser.getControl("Register course list").click()
     860        self.assertTrue('Course list has been registered'
     861            in self.browser.contents)
     862        return
     863
    833864    def test_student_clearance(self):
    834865        # Student cant login if their password is not set
Note: See TracChangeset for help on using the changeset viewer.