Ignore:
Timestamp:
2 May 2022, 09:50:27 (3 years ago)
Author:
Henrik Bettermann
Message:

Adjust test.

File:
1 edited

Legend:

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

    r16906 r16946  
    10131013        self.browser.getControl(name="form.password").value = 'spwd'
    10141014        self.browser.getControl("Login").click()
    1015         self.browser.open(self.student_path + '/studycourse/transcript')
     1015        # Students can't open the pdf transcript ...
     1016        transcript_path = self.student_path + '/studycourse/transcript'
     1017        self.assertRaises(
     1018            Unauthorized, self.browser.open, transcript_path)
     1019        # ... but managers can
     1020        self.browser.open(self.student_path)
     1021        self.browser.getLink("Logout").click()
     1022        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     1023        self.browser.open(transcript_path)
    10161024        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    10171025        self.assertTrue('Transcript' in self.browser.contents)
    1018         # Officers can open the pdf transcript
    10191026        self.browser.open(self.student_path + '/studycourse/transcript.pdf')
    10201027        self.assertEqual(self.browser.headers['Status'], '200 Ok')
Note: See TracChangeset for help on using the changeset viewer.