Changeset 11941 for main/kofacustom.skeleton/trunk
- Timestamp:
- 10 Nov 2014, 06:12:11 (10 years ago)
- Location:
- main/kofacustom.skeleton/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.skeleton/trunk/CHANGES.txt
r11647 r11941 4 4 1.2dev (unreleased) 5 5 =================== 6 7 * Create sample application_slip.pdf during tests. 6 8 7 9 * Use init_update method. -
main/kofacustom.skeleton/trunk/src/kofacustom/skeleton/applicants/tests/test_browser.py
r11813 r11941 24 24 from zope.catalog.interfaces import ICatalog 25 25 from zope.intid.interfaces import IIntIds 26 from hurry.workflow.interfaces import IWorkflowState 26 27 from kofacustom.skeleton.testing import FunctionalLayer 28 from waeup.kofa.browser.tests.test_pdf import samples_dir 27 29 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup 28 30 from waeup.kofa.applicants.tests.test_batching import ApplicantImportExportSetup … … 143 145 self.assertEqual(num_fail,0) 144 146 return 147 148 class ApplicantsContainerUITests(ApplicantsFullSetup): 149 # Tests for ApplicantsContainer class views and pages 150 151 layer = FunctionalLayer 152 153 def test_applicatio_slip(self): 154 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 155 self.slip_path = self.view_path + '/application_slip.pdf' 156 self.browser.open(self.manage_path) 157 self.assertEqual(self.browser.headers['Status'], '200 Ok') 158 self.fill_correct_values() 159 self.browser.getControl("Save").click() 160 IWorkflowState(self.applicant).setState('submitted') 161 self.browser.open(self.manage_path) 162 self.browser.getLink("Download application slip").click() 163 self.assertEqual(self.browser.headers['Status'], '200 Ok') 164 self.assertEqual(self.browser.headers['Content-Type'], 165 'application/pdf') 166 path = os.path.join(samples_dir(), 'application_slip.pdf') 167 open(path, 'wb').write(self.browser.contents) 168 print "Sample application_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.