- Timestamp:
- 29 Sep 2020, 07:00:27 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py
r16238 r16252 123 123 self.assertFalse(self.student.library) 124 124 125 def test_student_ basedata_slip(self):125 def test_student_studycourse_slip(self): 126 126 IWorkflowState(self.student).setState('school fee paid') 127 127 self.browser.open(self.login_path) … … 131 131 # Students can open base data slip 132 132 # (no button available in base package) 133 pdf_url = '%s/ basedata_slip.pdf' % self.studycourse_path133 pdf_url = '%s/studycourse_slip.pdf' % self.studycourse_path 134 134 self.browser.open(pdf_url) 135 135 self.assertEqual(self.browser.headers['Status'], '200 Ok') 136 136 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') 138 138 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 140 156 141 157 def test_student_admission_letter(self):
Note: See TracChangeset for help on using the changeset viewer.