- Timestamp:
- 22 Aug 2023, 13:47:07 (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/tests/test_browser.py
r16721 r17554 33 33 from waeup.kofa.interfaces import ( 34 34 IExtFileStore, IFileStoreNameChooser) 35 from waeup.kofa.browser.tests.test_pdf import samples_dir 35 36 from waeup.kofa.students.interfaces import IStudentsUtils 36 37 from kofacustom.unidel.testing import FunctionalLayer … … 42 43 layer = FunctionalLayer 43 44 44 def test_dummytest(self): 45 return 45 def test_student_examclearance_slip(self): 46 self.certificate.study_mode = 'ug_ft' 47 # Student cant login if their password is not set 48 IWorkflowState(self.student).setState('courses registered') 49 self.browser.open(self.login_path) 50 self.browser.getControl(name="form.login").value = self.student_id 51 self.browser.getControl(name="form.password").value = 'spwd' 52 self.browser.getControl("Login").click() 53 self.assertMatches( 54 '...You logged in...', self.browser.contents) 55 self.browser.getLink("Base Data").click() 56 self.browser.getLink("Download examination clearance slip").click() 57 self.assertEqual(self.browser.headers['Status'], '200 Ok') 58 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 59 path = os.path.join(samples_dir(), 'examclearance_slip.pdf') 60 open(path, 'wb').write(self.browser.contents) 61 print "Sample exampclearance_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.