Changeset 12565 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 7 Feb 2015, 07:15:24 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r12395 r12565 151 151 # Finally prove if an application slip can be created 152 152 try: 153 applicant_slip = getAdapter(self, IPDF, name='application_slip')(153 test_applicant_slip = getAdapter(self, IPDF, name='application_slip')( 154 154 view=view) 155 155 except IOError: … … 171 171 notify(grok.ObjectModifiedEvent(student)) 172 172 # Save application slip 173 applicant_slip = getAdapter(self, IPDF, name='application_slip')( 174 view=view) 173 175 self._saveApplicationPDF(student, applicant_slip, view=view) 174 176 return True, _('Student ${a} created', mapping = {'a':student.student_id}) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py
r12395 r12565 29 29 from waeup.kofa.interfaces import IExtFileStore, IFileStoreNameChooser 30 30 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup 31 from waeup.kofa.browser.tests.test_pdf import samples_dir 31 32 32 33 session = datetime.now().year - 2 … … 114 115 self.assertTrue(len(pdf) > 0) 115 116 self.assertEqual(pdf[:8], '%PDF-1.4') 117 # Copy te file to samples_dir 118 path = os.path.join(samples_dir(), 'aplication_slip.pdf') 119 open(path, 'wb').write(pdf) 120 print "Sample PDF aplication_slip.pdf written to %s" % path 116 121 # Check if there is an application slip link in UI 117 122 self.assertTrue('Application Slip' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.