From 54f52e3153b5f3a8c61e6b63b4bd799a861df67a Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Tue, 11 May 2010 21:07:10 +0000 Subject: [PATCH] Use general OOOD configuration from _getConversionServerDict. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35181 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5OOo/tests/testDms.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/product/ERP5OOo/tests/testDms.py b/product/ERP5OOo/tests/testDms.py index 025f0d1f37..8ab5fbc24f 100644 --- a/product/ERP5OOo/tests/testDms.py +++ b/product/ERP5OOo/tests/testDms.py @@ -54,6 +54,7 @@ import ZPublisher.HTTPRequest import transaction from Testing import ZopeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase +from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict from Products.ERP5Type.tests.utils import FileUpload from Products.ERP5Type.tests.utils import DummyLocalizer from Products.ERP5OOo.OOoUtils import OOoBuilder @@ -69,9 +70,6 @@ import httplib QUIET = 0 -# Define the conversion server host -conversion_server_host = ('127.0.0.1', 8008) - TEST_FILES_HOME = os.path.join(os.path.dirname(__file__), 'test_document') FILE_NAME_REGULAR_EXPRESSION = "(?P<reference>[A-Z]{3,10})-(?P<language>[a-z]{2})-(?P<version>[0-9]{3})" REFERENCE_REGULAR_EXPRESSION = "(?P<reference>[A-Z]{3,10})(-(?P<language>[a-z]{2}))?(-(?P<version>[0-9]{3}))?" @@ -119,8 +117,9 @@ class TestDocumentMixin(ERP5TypeTestCase): def setDefaultSitePreference(self): default_pref = self.portal.portal_preferences.default_site_preference - default_pref.setPreferredOoodocServerAddress(conversion_server_host[0]) - default_pref.setPreferredOoodocServerPortNumber(conversion_server_host[1]) + conversion_dict = _getConversionServerDict() + default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname']) + default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port']) default_pref.setPreferredDocumentFileNameRegularExpression(FILE_NAME_REGULAR_EXPRESSION) default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION) if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'): -- 2.30.9