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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 17 13:39:52 CEST 2010


Author: jerome
Date: Mon May 17 13:39:46 2010
New Revision: 35380

URL: http://svn.erp5.org?rev=35380&view=rev
Log:
test that one can force a different portal type than the guessed one (it was
not working in 5.4.5)

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=35380&r1=35379&r2=35380&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/tests/testDms.py [utf8] Mon May 17 13:39:46 2010
@@ -1322,6 +1322,15 @@
     self.assertEquals('File', document.getPortalType())
     self.assertEquals(contributed_document, document)
 
+  def test_Base_createNewFile_forced_type(self):
+    """Test contributing while forcing the portal type.
+    """
+    person = self.portal.person_module.newContent(portal_type='Person')
+    contributed_document = person.Base_contribute(
+                                     portal_type='PDF',
+                                     file=makeFileUpload('TEST-en-002.odt'))
+    self.assertEquals('PDF', contributed_document.getPortalType())
+
   def test_HTML_to_ODT_conversion_keep_enconding(self):
     """This test perform an PDF conversion of HTML content
     then to plain text.




More information about the Erp5-report mailing list