Commit c8b626fe authored by Julien Muchembled's avatar Julien Muchembled

Unit test: update oood configuration only if needed and without reindexing

This was breaking tests assuming there is no activity at the beginning, like in
testCMFActivity.

Also try to revert [33605] because default_site_preference should always exist
now.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33624 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1145a740
...@@ -528,7 +528,6 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase): ...@@ -528,7 +528,6 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase):
global current_app global current_app
current_app = self.app current_app = self.app
self._updateConnectionStrings() self._updateConnectionStrings()
self._updateConversionServerConfiguration()
def afterSetUp(self): def afterSetUp(self):
'''Called after setUp() has completed. This is '''Called after setUp() has completed. This is
...@@ -566,12 +565,9 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase): ...@@ -566,12 +565,9 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase):
"""Update conversion server (Oood) at default site preferences. """Update conversion server (Oood) at default site preferences.
""" """
conversion_dict = _getConversionServerDict() conversion_dict = _getConversionServerDict()
preference = self.portal.portal_preferences.default_site_preference
preference = getattr(self.portal.portal_preferences, preference._setPreferredOoodocServerAddress(conversion_dict['hostname'])
'default_site_preference', None) preference._setPreferredOoodocServerPortNumber(conversion_dict['port'])
if preference is not None:
preference.setPreferredOoodocServerAddress(conversion_dict['hostname'])
preference.setPreferredOoodocServerPortNumber(conversion_dict['port'])
def _recreateCatalog(self, quiet=0): def _recreateCatalog(self, quiet=0):
"""Clear activities and catalog and recatalog everything. """Clear activities and catalog and recatalog everything.
...@@ -986,6 +982,7 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase): ...@@ -986,6 +982,7 @@ class ERP5TypeTestCase(backportUnittest.TestCase, PortalTestCase):
pass pass
self.startZServer() self.startZServer()
self._updateConversionServerConfiguration()
self._updateConnectionStrings() self._updateConnectionStrings()
self._recreateCatalog() self._recreateCatalog()
self._installBusinessTemplateList(business_template_list, self._installBusinessTemplateList(business_template_list,
......
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