Ignore:
Timestamp:
29 Sep 2020, 07:00:27 (4 years ago)
Author:
Henrik Bettermann
Message:

More customizations regarding personal/bio data forms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py

    r16238 r16252  
    123123        self.assertFalse(self.student.library)
    124124
    125     def test_student_basedata_slip(self):
     125    def test_student_studycourse_slip(self):
    126126        IWorkflowState(self.student).setState('school fee paid')
    127127        self.browser.open(self.login_path)
     
    131131        # Students can open base data slip
    132132        # (no button available in base package)
    133         pdf_url = '%s/basedata_slip.pdf' % self.studycourse_path
     133        pdf_url = '%s/studycourse_slip.pdf' % self.studycourse_path
    134134        self.browser.open(pdf_url)
    135135        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    136136        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
    137         path = os.path.join(samples_dir(), 'basedata_slip.pdf')
     137        path = os.path.join(samples_dir(), 'studycourse_slip.pdf')
    138138        open(path, 'wb').write(self.browser.contents)
    139         print "Sample PDF basedata_slip.pdf written to %s" % path
     139        print "Sample PDF studycourse_slip.pdf written to %s" % path
     140
     141    def test_student_personal_slip(self):
     142        IWorkflowState(self.student).setState('school fee paid')
     143        self.browser.open(self.login_path)
     144        self.browser.getControl(name="form.login").value = self.student_id
     145        self.browser.getControl(name="form.password").value = 'spwd'
     146        self.browser.getControl("Login").click()
     147        # Students can open base data slip
     148        # (no button available in base package)
     149        pdf_url = '%s/personal_slip.pdf' % self.student_path
     150        self.browser.open(pdf_url)
     151        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     152        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
     153        path = os.path.join(samples_dir(), 'personal_slip.pdf')
     154        open(path, 'wb').write(self.browser.contents)
     155        print "Sample PDF personal_slip.pdf written to %s" % path
    140156
    141157    def test_student_admission_letter(self):
Note: See TracChangeset for help on using the changeset viewer.