Ignore:
Timestamp:
6 May 2020, 13:39:48 (5 years ago)
Author:
Henrik Bettermann
Message:

Implement ExportPDFBaseDataPlusSlip (without button in the base package)

File:
1 edited

Legend:

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

    r16030 r16086  
    26182618        return
    26192619
     2620    def test_student_basedata_slip(self):
     2621        IWorkflowState(self.student).setState('school fee paid')
     2622        self.browser.open(self.login_path)
     2623        self.browser.getControl(name="form.login").value = self.student_id
     2624        self.browser.getControl(name="form.password").value = 'spwd'
     2625        self.browser.getControl("Login").click()
     2626        # Students can open base data slip
     2627        # (no button available in base package)
     2628        pdf_url = '%s/basedata_slip.pdf' % self.studycourse_path
     2629        self.browser.open(pdf_url)
     2630        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     2631        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     2632        path = os.path.join(samples_dir(), 'basedata_slip.pdf')
     2633        open(path, 'wb').write(self.browser.contents)
     2634        print "Sample PDF basedata_slip.pdf written to %s" % path
     2635
    26202636    def test_student_clearance(self):
    26212637        # Student cant login if their password is not set
Note: See TracChangeset for help on using the changeset viewer.