installProduct() should only ever be called from the module top-level

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31653 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f00b5c58
...@@ -37,6 +37,11 @@ from Testing import ZopeTestCase ...@@ -37,6 +37,11 @@ from Testing import ZopeTestCase
from zipfile import ZipFile, ZIP_DEFLATED from zipfile import ZipFile, ZIP_DEFLATED
from StringIO import StringIO from StringIO import StringIO
ZopeTestCase.installProduct('Localizer')
ZopeTestCase.installProduct('PythonScripts')
ZopeTestCase.installProduct('ERP5OOo')
ZopeTestCase.installProduct('Five')
class TestOooDynamicStyle(ZopeTestCase.FunctionalTestCase): class TestOooDynamicStyle(ZopeTestCase.FunctionalTestCase):
manager_username = 'tatuya' manager_username = 'tatuya'
manager_password = 'tatuya' manager_password = 'tatuya'
...@@ -54,9 +59,6 @@ class TestOooDynamicStyle(ZopeTestCase.FunctionalTestCase): ...@@ -54,9 +59,6 @@ class TestOooDynamicStyle(ZopeTestCase.FunctionalTestCase):
def afterSetUp(self): def afterSetUp(self):
self.login() self.login()
ZopeTestCase.installProduct('Localizer')
ZopeTestCase.installProduct('PythonScripts')
ZopeTestCase.installProduct('ERP5OOo')
self.folder.Localizer = DummyLocalizer() self.folder.Localizer = DummyLocalizer()
v12schema_url = os.path.join(os.path.dirname(__file__), v12schema_url = os.path.join(os.path.dirname(__file__),
'OpenDocument-schema-v1.2-draft9.rng') 'OpenDocument-schema-v1.2-draft9.rng')
......
...@@ -35,12 +35,15 @@ from zLOG import LOG ...@@ -35,12 +35,15 @@ from zLOG import LOG
from Testing import ZopeTestCase from Testing import ZopeTestCase
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import install_product_quiet
from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5OOo.OOoUtils import OOoParser from Products.ERP5OOo.OOoUtils import OOoParser
from Products.ERP5.Document.Document import ConversionError from Products.ERP5.Document.Document import ConversionError
from DateTime import DateTime from DateTime import DateTime
import transaction import transaction
ZopeTestCase.installProduct('Sessions', quiet=install_product_quiet)
person_current_id = 1 person_current_id = 1
...@@ -102,7 +105,6 @@ class TestOOoImport(ERP5TypeTestCase): ...@@ -102,7 +105,6 @@ class TestOOoImport(ERP5TypeTestCase):
self.pref.enable() self.pref.enable()
# create browser_id_manager # create browser_id_manager
ZopeTestCase.installProduct('Sessions')
if not "browser_id_manager" in self.portal.objectIds(): if not "browser_id_manager" in self.portal.objectIds():
self.portal.manage_addProduct['Sessions'].constructBrowserIdManager() self.portal.manage_addProduct['Sessions'].constructBrowserIdManager()
......
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