[Erp5-report] r28949 - /erp5/trunk/products/ERP5OOo/tests/testDms.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 11 14:30:37 CEST 2009


Author: nicolas
Date: Fri Sep 11 14:30:34 2009
New Revision: 28949

URL: http://svn.erp5.org?rev=28949&view=rev
Log:
Test that content_type is well updated when upload a file

Modified:
    erp5/trunk/products/ERP5OOo/tests/testDms.py

Modified: erp5/trunk/products/ERP5OOo/tests/testDms.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/tests/testDms.py?rev=28949&r1=28948&r2=28949&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] Fri Sep 11 14:30:34 2009
@@ -786,7 +786,19 @@
     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):
 




More information about the Erp5-report mailing list