Commit 8a00c591 authored by Nicolas Delaby's avatar Nicolas Delaby

Define oood configuration in preference.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35319 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 636633d6
...@@ -34,7 +34,8 @@ import os ...@@ -34,7 +34,8 @@ import os
import transaction import transaction
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
_getConversionServerDict
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.Sequence import SequenceList
from zExceptions import BadRequest from zExceptions import BadRequest
...@@ -80,6 +81,7 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -80,6 +81,7 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
portal_catalog = self.getCatalogTool() portal_catalog = self.getCatalogTool()
#portal_catalog.manage_catalogClear() #portal_catalog.manage_catalogClear()
self.createCategories() self.createCategories()
self.setDefaultSitePreference()
#Overwrite immediateReindexObject() with a crashing method #Overwrite immediateReindexObject() with a crashing method
def crashingMethod(self): def crashingMethod(self):
...@@ -105,6 +107,15 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -105,6 +107,15 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
o = self.category_tool.group.newContent(portal_type='Category', o = self.category_tool.group.newContent(portal_type='Category',
id=category_id) id=category_id)
def setDefaultSitePreference(self):
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'):
default_pref.enable()
return default_pref
def stepRemoveWorkflowsRelated(self, sequence=None, sequence_list=None, def stepRemoveWorkflowsRelated(self, sequence=None, sequence_list=None,
**kw): **kw):
""" """
......
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