- Timestamp:
- 10 Nov 2014, 07:23:07 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.wdu/trunk/src/kofacustom/wdu/applicants/tests/test_browser.py
r11940 r11942 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.wdu.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 149 class ApplicantsContainerUITests(ApplicantsFullSetup): 150 # Tests for ApplicantsContainer class views and pages 151 152 layer = FunctionalLayer 153 154 def test_application_slip(self): 155 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 156 self.slip_path = self.view_path + '/application_slip.pdf' 157 self.browser.open(self.manage_path) 158 self.assertEqual(self.browser.headers['Status'], '200 Ok') 159 self.fill_correct_values() 160 self.browser.getControl("Save").click() 161 IWorkflowState(self.applicant).setState('submitted') 162 self.browser.open(self.manage_path) 163 self.browser.getLink("Download application slip").click() 164 self.assertEqual(self.browser.headers['Status'], '200 Ok') 165 self.assertEqual(self.browser.headers['Content-Type'], 166 'application/pdf') 167 path = os.path.join(samples_dir(), 'application_slip.pdf') 168 open(path, 'wb').write(self.browser.contents) 169 print "Sample application_slip.pdf written to %s" % path
Note: See TracChangeset for help on using the changeset viewer.