Ignore:
Timestamp:
13 Apr 2015, 14:55:28 (10 years ago)
Author:
Henrik Bettermann
Message:

Students are only allowed to download course registration slips if they are
in state 'registered' and their current level corresponds with the course
registration level.

File:
1 edited

Legend:

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

    r12846 r12855  
    366366        self.browser.getLink("COURSE1").click()
    367367        self.assertFalse('Score' in self.browser.contents)
    368         # Students can open the customized pdf course registration slip
    369         self.browser.open(self.student_path + '/studycourse/100')
    370         self.browser.getLink("Download course registration slip").click()
    371         self.assertEqual(self.browser.headers['Status'], '200 Ok')
    372         self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
    373368        # Students can open the special Uniben pdf course result slip
    374369        self.browser.open(self.student_path + '/studycourse/100')
     
    384379        self.browser.getControl("Remove selected", index=0).click()
    385380        self.assertTrue('Successfully removed' in self.browser.contents)
     381        # Students can open the customized pdf course registration slip
     382        # if they have registered their course list
     383        self.browser.open(
     384            self.student_path + '/studycourse/100/course_registration_slip.pdf')
     385        self.assertTrue('Forbidden' in self.browser.contents)
     386        IWorkflowState(self.student).setState('courses registered')
     387        self.browser.open(self.student_path + '/studycourse/100')
     388        self.browser.getLink("Download course registration slip").click()
     389        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     390        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
    386391
    387392    def test_get_returning_data(self):
Note: See TracChangeset for help on using the changeset viewer.