Changeset 12456 for main/waeup.kofa/trunk
- Timestamp:
- 13 Jan 2015, 06:23:01 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/documents
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/documents/browser.py
r12438 r12456 262 262 @property 263 263 def form_fields(self): 264 return grok.AutoFields(self.context.form_fields_interface) 264 return grok.AutoFields( 265 self.context.form_fields_interface).omit('document_id') 265 266 266 267 def label(self): -
main/waeup.kofa/trunk/src/waeup/kofa/documents/document.py
r12441 r12456 145 145 grok.provides(IPDFDocument) 146 146 147 filenames = (' sample.pdf',)147 filenames = ('file.pdf',) 148 148 149 149 form_fields_interface = IPDFDocument -
main/waeup.kofa/trunk/src/waeup/kofa/documents/fileviewlets.py
r12448 r12456 41 41 title = _(u'PDF File') 42 42 mus = 1024 * 200 43 download_name = u' sample.pdf'43 download_name = u'file.pdf' 44 44 tab_redirect = '#tab2' 45 45 … … 58 58 label = _(u'PDF Scan') 59 59 title = _(u'PDF Scan') 60 download_name = u' sample.pdf'60 download_name = u'file.pdf' 61 61 62 62 @property … … 69 69 """ 70 70 ##: Needs to be protected if not published 71 grok.name(' sample.pdf')71 grok.name('file.pdf') 72 72 grok.context(PDFDocument) 73 73 grok.require('waeup.Public') 74 download_name = u' sample.pdf'74 download_name = u'file.pdf' 75 75 76 76 @property -
main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py
r12447 r12456 148 148 name='upload_pdfscanmanageupload').click() 149 149 self.assertTrue( 150 'href="http://localhost/app/documents/DOC1/ sample.pdf">DOC1.pdf</a>'150 'href="http://localhost/app/documents/DOC1/file.pdf">DOC1.pdf</a>' 151 151 in self.browser.contents) 152 152 # The file can be found in the file system 153 153 file = getUtility(IExtFileStore).getFileByContext( 154 document, attr=' sample.pdf')154 document, attr='file.pdf') 155 155 file_content = file.read() 156 156 pdf.seek(0) … … 164 164 in self.browser.contents) 165 165 IWorkflowState(document).setState(PUBLISHED) 166 self.browser.open(self.container_path + '/DOC1/ sample.pdf')166 self.browser.open(self.container_path + '/DOC1/file.pdf') 167 167 self.assertEqual( 168 168 self.browser.headers['content-type'], 'application/pdf') … … 190 190 # File has been removed too 191 191 file = getUtility(IExtFileStore).getFileByContext( 192 document, attr=' sample.pdf')192 document, attr='file.pdf') 193 193 self.assertTrue(file is None) 194 194 … … 208 208 % document.document_id in logcontent) 209 209 self.assertTrue( 210 'INFO - zope.mgr - documents.browser.DocumentManageFormPage - %s - uploaded: sample.pdf (my_sample_scan.pdf)'210 'INFO - zope.mgr - documents.browser.DocumentManageFormPage - %s - uploaded: file.pdf (my_sample_scan.pdf)' 211 211 % document.document_id in logcontent) 212 212 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.