Commit 54f52e31 authored by Rafael Monnerat's avatar Rafael Monnerat

Use general OOOD configuration from _getConversionServerDict.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35181 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dc984ae3
...@@ -54,6 +54,7 @@ import ZPublisher.HTTPRequest ...@@ -54,6 +54,7 @@ import ZPublisher.HTTPRequest
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
from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict
from Products.ERP5Type.tests.utils import FileUpload from Products.ERP5Type.tests.utils import FileUpload
from Products.ERP5Type.tests.utils import DummyLocalizer from Products.ERP5Type.tests.utils import DummyLocalizer
from Products.ERP5OOo.OOoUtils import OOoBuilder from Products.ERP5OOo.OOoUtils import OOoBuilder
...@@ -69,9 +70,6 @@ import httplib ...@@ -69,9 +70,6 @@ import httplib
QUIET = 0 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') 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})" 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}))?" 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): ...@@ -119,8 +117,9 @@ class TestDocumentMixin(ERP5TypeTestCase):
def setDefaultSitePreference(self): def setDefaultSitePreference(self):
default_pref = self.portal.portal_preferences.default_site_preference default_pref = self.portal.portal_preferences.default_site_preference
default_pref.setPreferredOoodocServerAddress(conversion_server_host[0]) conversion_dict = _getConversionServerDict()
default_pref.setPreferredOoodocServerPortNumber(conversion_server_host[1]) default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
default_pref.setPreferredDocumentFileNameRegularExpression(FILE_NAME_REGULAR_EXPRESSION) default_pref.setPreferredDocumentFileNameRegularExpression(FILE_NAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION) default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'): if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'):
......
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