From af7d75ac208481bb470c82cdc5492093999b62bf Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Wed, 30 Mar 2011 08:30:19 +0000
Subject: [PATCH] Portal contributions is embedded by erp5_ingestion which is
 not installed. Create a document as a Embedded File of an organisation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44772 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testBase.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/product/ERP5/tests/testBase.py b/product/ERP5/tests/testBase.py
index 175183ccb7..434117e815 100644
--- a/product/ERP5/tests/testBase.py
+++ b/product/ERP5/tests/testBase.py
@@ -1086,10 +1086,11 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
       def __init__(self, filename):
         self.filename = os.path.basename(filename)
         file.__init__(self, filename)
-    file_document = self.portal.portal_contributions.newContent(
-                                          portal_type='File',
-                                          file=DummyFile(__file__),
-                                          content_type='text/plain')
+    portal = self.getPortal()
+    organisation = portal.organisation_module.newContent(portal_type='Organisation')
+    file_document = organisation.newContent(portal_type='Embedded File',
+                                            file=DummyFile(__file__),
+                                            content_type='text/plain')
 
     # login as a member
     uf = self.portal.acl_users
-- 
2.30.9