From 69092ae751309e2deadb9a03a010f6f53ac08230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 17 May 2010 11:39:46 +0000 Subject: [PATCH] test that one can force a different portal type than the guessed one (it was not working in 5.4.5) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35380 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5OOo/tests/testDms.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/product/ERP5OOo/tests/testDms.py b/product/ERP5OOo/tests/testDms.py index 319dc6b9d4..c4eb17961d 100644 --- a/product/ERP5OOo/tests/testDms.py +++ b/product/ERP5OOo/tests/testDms.py @@ -1322,6 +1322,15 @@ class TestDocument(TestDocumentMixin): 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. -- 2.30.9