Commit c199bff5 authored by Nicolas Delaby's avatar Nicolas Delaby

Test that content_type is well updated when upload a file

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28949 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4dc43710
......@@ -786,7 +786,19 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEquals('1', content_information['Pages'])
self.assertEquals('subject', content_information['Subject'])
self.assertEquals('title', content_information['Title'])
self.assertEquals('application/pdf', document.getContentType())
def test_PDF_content_content_type(self):
upload_file = makeFileUpload('REF-en-001.pdf')
document = self.portal.document_module.newContent(portal_type='PDF',
file=upload_file)
self.tic()
self.assertEquals('PDF', document.getPortalType())
content_information = document.getContentInformation()
self.assertEquals('1', content_information['Pages'])
self.assertEquals('subject', content_information['Subject'])
self.assertEquals('title', content_information['Title'])
self.assertEquals('application/pdf', document.getContentType())
class TestDocumentWithSecurity(ERP5TypeTestCase):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment