Commit 228e3f79 authored by Jérome Perrin's avatar Jérome Perrin

Revert 3 latest commits

Revert "Test deferred style with converting to a format"

This reverts commit cbfa8d56.
-> pushed by mistake

Revert "Set cloudoo on preferences in ERP5TypeTestCase"

This reverts commit 28824962.
-> pushed by mistake

Revert "Listbox from Folder_viewWorkflowActionDialog has hidden columns"

This reverts commit 802d3f53.
-> a test is failing
parent cbfa8d56
No related merge requests found
......@@ -488,6 +488,9 @@ class TestUNG(ERP5TypeTestCase):
self.logout()
self.assertEquals(json.loads(self.portal.Base_getPreferencePathList()), None)
self.login("ERP5TypeTestCase")
self.changeSkin("UNGDoc")
preference_dict = json.loads(self.portal.Base_getPreferencePathList())
self.assertEquals(preference_dict, {})
self.portal.portal_preferences.ung_preference.enable()
self.tic()
self.changeSkin("UNGDoc")
......
......@@ -102,19 +102,19 @@
</tuple>
<tuple>
<string>portal_type</string>
<string></string>
<string>Portal Type</string>
</tuple>
<tuple>
<string>state_var</string>
<string></string>
<string>Variable</string>
</tuple>
<tuple>
<string>workflow_state</string>
<string></string>
<string>State ID</string>
</tuple>
<tuple>
<string>relative_url</string>
<string></string>
<string>Relative URL</string>
</tuple>
</list>
</value>
......
41093
\ No newline at end of file
41091
\ No newline at end of file
......@@ -61,11 +61,8 @@ class TestAuoLogout(ERP5TypeTestCase):
self.login(self.manager_username)
# setup short auto-logout period
preference = self.portal.portal_preferences[
self.getDefaultSitePreferenceId()]
preference.setPreferredMaxUserInactivityDuration(5)
if self.portal.portal_workflow.isTransitionPossible(preference, 'enable'):
preference.enable()
portal.portal_preferences.default_site_preference.setPreferredMaxUserInactivityDuration(5)
portal.portal_preferences.default_site_preference.enable()
self.tic()
def test_01_AutoLogout(self):
......
......@@ -33,9 +33,10 @@ import os
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
_getConversionServerDict
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl import getSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.Base import Base
from Products.ERP5Type.Utils import convertToUpperCase
......@@ -93,6 +94,7 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
portal_catalog = self.getCatalogTool()
#portal_catalog.manage_catalogClear()
self.createCategories()
self.setDefaultSitePreference()
#Overwrite immediateReindexObject() with a crashing method
def crashingMethod(self):
......@@ -118,6 +120,15 @@ class TestBase(ERP5TypeTestCase, ZopeTestCase.Functional):
o = self.category_tool.group.newContent(portal_type='Category',
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,
**kw):
"""
......
......@@ -29,9 +29,10 @@
import unittest
import os
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.CMFCore.WorkflowCore import WorkflowException
from Products.ERP5Type.tests.utils import FileUpload
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
_getConversionServerDict
from Products.ERP5OOo.tests.testIngestion import FILENAME_REGULAR_EXPRESSION
from Products.ERP5OOo.tests.testIngestion import REFERENCE_REGULAR_EXPRESSION
from Products.ERP5Type.tests.backportUnittest import expectedFailure
......@@ -956,6 +957,9 @@ class TestCRMMailSend(BaseTestCRM):
# set preference
default_pref = self.portal.portal_preferences.default_site_preference
conversion_dict = _getConversionServerDict()
default_pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
default_pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
default_pref.setPreferredDocumentFilenameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if default_pref.getPreferenceState() == 'disabled':
......
......@@ -114,6 +114,7 @@ class TestERP5Coordinate(ERP5TypeTestCase):
pref = self.portal.portal_preferences.default_site_preference
pref.setPreferredTelephoneDefaultCountryNumber('33')
pref.setPreferredTelephoneDefaultAreaNumber('2')
pref.enable()
tel.fromText(coordinate_text='11111111')
self.assertEquals('+33(0)2-11111111',tel.asText())
......@@ -123,6 +124,7 @@ class TestERP5Coordinate(ERP5TypeTestCase):
pref = self.portal.portal_preferences.default_site_preference
pref.setPreferredTelephoneDefaultCountryNumber('')
pref.setPreferredTelephoneDefaultAreaNumber('')
pref.enable()
tel.fromText(coordinate_text='+11 1 11111111')
tel.fromText(coordinate_text='+22333445555')
self.assertEquals('+(0)-22333445555',tel.asText())
......@@ -315,6 +317,7 @@ class TestERP5Coordinate(ERP5TypeTestCase):
pref = self.portal.portal_preferences.default_site_preference
pref.setPreferredTelephoneDefaultCountryNumber('')
pref.setPreferredTelephoneDefaultAreaNumber('')
pref.enable()
tel.fromText(coordinate_text='12345678')
self.assertEquals('+(0)-12345678',tel.asText())
......
......@@ -29,7 +29,9 @@
import unittest
import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
_getConversionServerDict
class TestERP5WebWithCRM(ERP5TypeTestCase):
......@@ -57,6 +59,21 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
user = self.createUser('robby')
self.createUserAssignment(user, {})
def setSystemPreference(self):
portal_type = 'System Preference'
preference_list = self.portal.portal_preferences.contentValues(
portal_type=portal_type)
if not preference_list:
preference = self.portal.portal_preferences.newContent(
portal_type=portal_type)
else:
preference = preference_list[0]
conversion_dict = _getConversionServerDict()
preference.setPreferredOoodocServerAddress(conversion_dict['hostname'])
preference.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(preference, 'enable'):
preference.enable()
def clearModule(self, module):
module.manage_delObjects(list(module.objectIds()))
self.tic()
......
......@@ -34,8 +34,9 @@ from lxml import etree
from AccessControl import Unauthorized
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
_getConversionServerDict
from Products.ERP5Type.tests.utils import FileUpload, createZODBPythonScript
from Products.ERP5.Document.Document import ConversionError
......@@ -108,10 +109,20 @@ class TestERP5WebWithDms(ERP5TypeTestCase, ZopeTestCase.Functional):
def afterSetUp(self):
self.login()
portal = self.getPortal()
self.setDefaultSitePreference()
self.web_page_module = self.portal.web_page_module
self.web_site_module = self.portal.web_site_module
self.portal_id = self.portal.getId()
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 clearModule(self, module):
module.manage_delObjects(list(module.objectIds()))
self.tic()
......
......@@ -84,8 +84,8 @@ class TestResource(ERP5TypeTestCase):
preference = portal_preferences.newContent(portal_type='System Preference',
title='Default Site Preference',
id='test_site_preference')
if preference.getPreferenceState() == 'disabled':
preference.enable()
if preference.getPreferenceState() == 'disabled':
preference.enable()
preference.setPreferredApparelModelVariationBaseCategoryList(('size', 'industrial_phase',))
preference.setPreferredApparelClothVariationBaseCategoryList(('size',))
......
......@@ -28,11 +28,13 @@
##############################################################################
import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase,\
_getConversionServerDict
import urlnorm # This library is imported to detect lack of
# urlnorm availibility in python environment
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
# test files' home
FILENAME_REGULAR_EXPRESSION = "(?P<reference>[A-Z&é@{]{3,7})-(?P<language>[a-z]{2})-(?P<version>[0-9]{3})"
REFERENCE_REGULAR_EXPRESSION = "(?P<reference>[A-Z&é@{]{3,7})(-(?P<language>[a-z]{2}))?(-(?P<version>[0-9]{3}))?"
......@@ -92,6 +94,11 @@ class TestWebCrawler(ERP5TypeTestCase):
if system_preference is None:
system_preference = portal_preferences.newContent(id=self.system_pref_id,
portal_type='System Preference')
conversion_dict = _getConversionServerDict()
system_preference.\
setPreferredOoodocServerAddress(conversion_dict['hostname'])
system_preference.\
setPreferredOoodocServerPortNumber(conversion_dict['port'])
system_preference.setPreferredDocumentFilenameRegularExpression(
FILENAME_REGULAR_EXPRESSION)
system_preference.setPreferredDocumentReferenceRegularExpression(
......
......@@ -32,6 +32,7 @@ from DateTime import DateTime
from AccessControl import Unauthorized
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict
from AccessControl.SecurityManagement import newSecurityManager
class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
......@@ -117,8 +118,23 @@ class TestLiveConfiguratorWorkflowMixin(SecurityTestCase):
# it is required by SecurityTestCase
self.workflow_tool = self.portal.portal_workflow
self.setDefaultSitePreference()
self.setSystemPreference()
self.portal.portal_activities.unsubscribe()
def setSystemPreference(self):
portal_type = 'System Preference'
preference_list = self.portal.portal_preferences.contentValues(
portal_type=portal_type)
if not preference_list:
preference = self.portal.portal_preferences.newContent(
portal_type=portal_type)
else:
preference = preference_list[0]
conversion_dict = _getConversionServerDict()
preference.setPreferredOoodocServerAddress(conversion_dict['hostname'])
preference.setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(preference, 'enable'):
preference.enable()
def setDefaultSitePreference(self):
default_pref = self.portal.portal_preferences.default_site_preference
......
......@@ -31,6 +31,7 @@
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict
from AccessControl.SecurityManagement import newSecurityManager
from StringIO import StringIO
......@@ -46,6 +47,15 @@ class TestFormPrintoutMixin(ERP5TypeTestCase):
user = uf.getUserById('zope').__of__(uf)
newSecurityManager(None, user)
def setSystemPreference(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'])
#default_pref.setPreferredConversionCacheFactory('document_cache_factory')
if default_pref.getPreferenceState() != 'global':
default_pref.enable()
def _validate(self, odf_file_data):
error_list = self.validator.validate(odf_file_data)
if error_list:
......
......@@ -39,7 +39,6 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
skin = content_type = None
recipient_email_address = 'invalid@example.com'
attachment_file_extension = ''
format = ''
username = 'bob'
password = 'bobpwd'
# the weird '<' char is to force quoting of the first name on the e-mail
......@@ -84,8 +83,8 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.loginAsUser('bob')
self.portal.changeSkin('Deferred')
response = self.publish(
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s&format=%s'
% (self.portal.getId(), self.skin, self.format), '%s:%s' % (self.username, self.password))
'/%s/person_module/pers/Base_viewHistory?deferred_portal_skin=%s'
% (self.portal.getId(), self.skin), '%s:%s' % (self.username, self.password))
self.tic()
last_message = self.portal.MailHost._last_message
self.assertNotEquals((), last_message)
......@@ -103,12 +102,9 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEquals('attachment; filename="%s"' % expected_file_name,
part.get('Content-Disposition'))
data = part.get_payload(decode=True)
if self.format == '':
error_list = Validator().validate(data)
if error_list:
self.fail(''.join(error_list))
elif self.format == 'pdf':
self.assertTrue(data.startswith('%PDF'))
error_list = Validator().validate(data)
if error_list:
self.fail(''.join(error_list))
break
else:
self.fail('Attachment not found in email\n%s' % message_text)
......@@ -120,9 +116,8 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
response = self.publish(
'/%s/person_module/pers/Base_callDialogMethod?deferred_portal_skin=%s&'
'dialog_method=Person_view&dialog_id=Person_view&'
'deferred_style:int=1&format=%s&junk=%s' % (self.portal.getId(),
'deferred_style:int=1&junk=%s' % (self.portal.getId(),
self.skin,
self.format,
'X' * 2000),
'%s:%s' % (self.username, self.password))
self.tic()
......@@ -141,12 +136,9 @@ class TestDeferredStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
self.assertEquals('attachment; filename="%s"' % expected_file_name,
part.get('Content-Disposition'))
data = part.get_payload(decode=True)
if self.format == '':
error_list = Validator().validate(data)
if error_list:
self.fail(''.join(error_list))
elif self.format == 'pdf':
self.assertTrue(data.startswith('%PDF'))
error_list = Validator().validate(data)
if error_list:
self.fail(''.join(error_list))
break
else:
self.fail('Attachment not found in email\n%s' % message_text)
......@@ -157,42 +149,16 @@ class TestODSDeferredStyle(TestDeferredStyle):
content_type = 'application/vnd.oasis.opendocument.spreadsheet'
attachment_file_extension = '.ods'
class TestODSDeferredStyleFormatXLSX(TestDeferredStyle):
skin = 'ODS'
content_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
attachment_file_extension = '.xlsx'
format = 'xlsx'
class TestODSDeferredStyleFormatPDF(TestDeferredStyle):
skin = 'ODS'
content_type = 'application/pdf'
attachment_file_extension = '.pdf'
format = 'pdf'
class TestODTDeferredStyle(TestDeferredStyle):
skin = 'ODT'
content_type = 'application/vnd.oasis.opendocument.text'
attachment_file_extension = '.odt'
class TestODTDeferredStyleFormatDOCX(TestDeferredStyle):
skin = 'ODT'
content_type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
attachment_file_extension = '.docx'
format = 'docx'
class TestODTDeferredStyleFormatPDF(TestDeferredStyle):
skin = 'ODT'
content_type = 'application/pdf'
attachment_file_extension = '.pdf'
format = 'pdf'
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestODSDeferredStyle))
suite.addTest(unittest.makeSuite(TestODSDeferredStyleFormatXLSX))
suite.addTest(unittest.makeSuite(TestODSDeferredStyleFormatPDF))
suite.addTest(unittest.makeSuite(TestODTDeferredStyle))
suite.addTest(unittest.makeSuite(TestODTDeferredStyleFormatDOCX))
suite.addTest(unittest.makeSuite(TestODTDeferredStyleFormatPDF))
return suite
......@@ -54,6 +54,7 @@ from cgi import FieldStorage
import ZPublisher.HTTPRequest
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
......@@ -126,6 +127,9 @@ class TestDocumentMixin(ERP5TypeTestCase):
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'])
default_pref.setPreferredDocumentFilenameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if self.portal.portal_workflow.isTransitionPossible(default_pref, 'enable'):
......
......@@ -58,6 +58,7 @@ class TestFormPrintoutAsODG(TestFormPrintoutMixin):
def afterSetUp(self):
self.login()
self.setSystemPreference()
# XML validator
v12schema_url = os.path.join(os.path.dirname(__file__),
'OpenDocument-v1.2-os-schema.rng')
......
......@@ -52,6 +52,7 @@ class TestFormPrintoutAsODT(TestFormPrintoutMixin):
def afterSetUp(self):
self.login()
self.setSystemPreference()
# XML validator
v12schema_url = os.path.join(os.path.dirname(__file__),
'OpenDocument-v1.2-os-schema.rng')
......
......@@ -142,6 +142,9 @@ class TestIngestion(ERP5TypeTestCase):
def setSystemPreference(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'])
default_pref.setPreferredDocumentFilenameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if default_pref.getPreferenceState() != 'global':
......
......@@ -104,10 +104,8 @@ class TestOoodResponse(ERP5TypeTestCase):
request = self.portal.REQUEST
request.RESPONSE.setHeader('content-type', 'text/html')
ERP5Site_viewNothingAsOdt = self.getPortal().ERP5Site_viewNothingAsOdt
# Unset oood coordinates in preferences
preference = self.portal.portal_preferences[
self.getDefaultSitePreferenceId()]
preference.setPreferredOoodocServerAddress("")
# This assumes that a conversion error is raised because oood coordinates
# are not defined in preferences.
self.assertRaises(ConversionError, ERP5Site_viewNothingAsOdt,
batch_mode=0, format='pdf')
self.assertEqual('text/html',
......@@ -117,11 +115,8 @@ class TestOoodResponse(ERP5TypeTestCase):
request = self.portal.REQUEST
request.RESPONSE.setHeader('content-type', 'text/html')
ERP5Site_viewNothingAsOdt = self.getPortal().ERP5Site_viewNothingAsOdt
# Unset oood coordinates in preferences
preference = self.portal.portal_preferences[
self.getDefaultSitePreferenceId()]
preference.setPreferredOoodocServerAddress("")
# This assumes that a conversion error is raised because oood coordinates
# are not defined in preferences.
self.assertRaises(ConversionError, ERP5Site_viewNothingAsOdt,
batch_mode=1, format='pdf')
self.assertEqual('text/html', request.RESPONSE.getHeader('content-type').split(';')[0])
......
......@@ -32,9 +32,11 @@ import os
from AccessControl.SecurityManagement import newSecurityManager
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.Sequence import SequenceList
from Products.ERP5OOo.OOoUtils import OOoParser
from Products.ERP5Form.PreferenceTool import Priority
from DateTime import DateTime
def makeFilePath(name):
......@@ -55,6 +57,11 @@ class TestOOoImportMixin(ERP5TypeTestCase):
self.login()
self.pref = self.portal.portal_preferences.newContent(
portal_type='System Preference')
conversion_dict = _getConversionServerDict()
self.pref.setPreferredOoodocServerAddress(conversion_dict['hostname'])
self.pref.setPreferredOoodocServerPortNumber(conversion_dict['port'])
self.pref.setPriority(Priority.SITE)
self.pref.enable()
# create browser_id_manager
if not "browser_id_manager" in self.portal.objectIds():
......
......@@ -28,9 +28,10 @@
##############################################################################
import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase, \
_getConversionServerDict
from Products.ERP5Form.Selection import Selection
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5OOo.tests.utils import Validator
import httplib
......@@ -52,6 +53,8 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
if not self.skin:
raise NotImplementedError('Subclasses must define skin')
self.setDefaultSitePreference()
gender = self.portal.portal_categories.gender
if 'male' not in gender.objectIds():
gender.newContent(id='male')
......@@ -82,6 +85,15 @@ class TestOOoStyle(ERP5TypeTestCase, ZopeTestCase.Functional):
name = 'person_module_selection'
self.portal.portal_selections.setSelectionFor(name, Selection(name))
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 publish(self, *args, **kw):
kw['handle_errors'] = not debug
return super(TestOOoStyle, self).publish(*args, **kw)
......
......@@ -34,6 +34,7 @@ import unittest
from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.runUnitTest import tests_home
from Products.ERP5Type.tests.ERP5TypeTestCase import _getConversionServerDict
from Products.ERP5Type.tests.utils import FileUpload
from Products.ERP5SyncML.Tool import SynchronizationTool
from Products.ERP5SyncML.tests.testERP5SyncML import TestERP5SyncMLMixin
......@@ -146,6 +147,9 @@ class TestERP5DocumentSyncMLMixin(TestERP5SyncMLMixin):
def setSystemPreferences(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'])
default_pref.setPreferredDocumentFileNameRegularExpression(FILENAME_REGULAR_EXPRESSION)
default_pref.setPreferredDocumentReferenceRegularExpression(REFERENCE_REGULAR_EXPRESSION)
if default_pref.getPreferenceState() == 'disabled':
......
......@@ -889,9 +889,6 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
preference._setPreferredOoodocServerAddress(conversion_dict['hostname'])
preference._setPreferredOoodocServerPortNumber(conversion_dict['port'])
if self.portal.portal_workflow.isTransitionPossible(preference, 'enable'):
preference.enable()
def _updateMemcachedConfiguration(self):
"""Update default memcached plugin configuration
"""
......
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