Changeset 14887 for main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Timestamp:
- 1 Nov 2017, 13:31:54 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/tests/test_browser.py
r14721 r14887 30 30 from zope.testbrowser.testing import Browser 31 31 from kofacustom.dspg.testing import FunctionalLayer 32 from hurry.workflow.interfaces import IWorkflowState 32 33 from waeup.kofa.app import University 34 from waeup.kofa.browser.tests.test_pdf import samples_dir 33 35 from waeup.kofa.university.faculty import Faculty 34 36 from waeup.kofa.university.department import Department 35 37 from waeup.kofa.testing import FunctionalTestCase 36 38 from waeup.kofa.applicants.tests.test_batching import ApplicantImportExportSetup 39 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup 37 40 from waeup.kofa.applicants.container import ApplicantsContainer 38 41 … … 184 187 applicant.password = 'any password' 185 188 return applicant 189 190 class ApplicantsContainerUITests(ApplicantsFullSetup): 191 # Tests for ApplicantsContainer class views and pages 192 193 layer = FunctionalLayer 194 195 def test_application_slip(self): 196 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 197 self.slip_path = self.view_path + '/application_slip.pdf' 198 self.browser.open(self.manage_path) 199 self.assertEqual(self.browser.headers['Status'], '200 Ok') 200 self.fill_correct_values() 201 self.browser.getControl("Save").click() 202 IWorkflowState(self.applicant).setState('submitted') 203 self.browser.open(self.manage_path) 204 self.browser.getLink("Download application slip").click() 205 self.assertEqual(self.browser.headers['Status'], '200 Ok') 206 self.assertEqual(self.browser.headers['Content-Type'], 207 'application/pdf') 208 path = os.path.join(samples_dir(), 'application_slip.pdf') 209 open(path, 'wb').write(self.browser.contents) 210 print "Sample application_slip.pdf written to %s" % path -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/browser/pdf.py
r14713 r14887 33 33 34 34 watermark_pos = [95, 150] 35 logo_pos = [520, 7 10, 40]35 logo_pos = [520, 700, 40]
Note: See TracChangeset for help on using the changeset viewer.