Ignore:
Timestamp:
24 Nov 2023, 11:20:06 (13 months ago)
Author:
Henrik Bettermann
Message:

Implement a QR Code view.

File:
1 edited

Legend:

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

    r17261 r17650  
    30353035                           self.browser.contents)
    30363036
     3037    def test_student_qrcodeview(self):
     3038        IWorkflowInfo(self.student).fireTransition('admit')
     3039        self.browser.open(self.login_path)
     3040        self.browser.getControl(name="form.login").value = self.student_id
     3041        self.browser.getControl(name="form.password").value = 'spwd'
     3042        self.browser.getControl("Login").click()
     3043        self.browser.open(self.student_path + '/qrcode_admission_letter.png')
     3044        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     3045        self.assertEqual(self.browser.headers['Content-Type'], 'image/png')
     3046        path = os.path.join(samples_dir(), 'qrcode_admission_letter.png')
     3047        open(path, 'wb').write(self.browser.contents)
     3048        print "Sample png file written to %s" % path
     3049
    30373050    def test_student_course_registration(self):
    30383051        # Student cant login if their password is not set
Note: See TracChangeset for help on using the changeset viewer.