Commit efed5647 authored by Romain Courteaud's avatar Romain Courteaud

Configure portal_memcached.

parent 2f0b56d0
...@@ -191,6 +191,19 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -191,6 +191,19 @@ class testVifibMixin(ERP5TypeTestCase):
setattr(self, 'stepCall' + convertToUpperCase(alarm.getId()) \ setattr(self, 'stepCall' + convertToUpperCase(alarm.getId()) \
+ 'Alarm', makeCallAlarm(alarm)) + 'Alarm', makeCallAlarm(alarm))
def setUpMemcached(self):
from Products.ERP5Type.tests.ERP5TypeTestCase import\
_getVolatileMemcachedServerDict, _getPersistentMemcachedServerDict
memcached_tool = self.getPortal().portal_memcached
# setup default volatile distributed memcached
connection_dict = _getVolatileMemcachedServerDict()
url_string = '%(hostname)s:%(port)s' % connection_dict
memcached_tool.default_memcached_plugin.setUrlString(url_string)
# setup default persistent distributed memcached
connection_dict = _getPersistentMemcachedServerDict()
url_string = '%(hostname)s:%(port)s' % connection_dict
memcached_tool.persistent_memcached_plugin.setUrlString(url_string)
def afterSetUp(self, quiet=1, run=run_all_test): def afterSetUp(self, quiet=1, run=run_all_test):
""" """
Create ERP5 user. Create ERP5 user.
...@@ -206,6 +219,7 @@ class testVifibMixin(ERP5TypeTestCase): ...@@ -206,6 +219,7 @@ class testVifibMixin(ERP5TypeTestCase):
setSecurityManager(sm) setSecurityManager(sm)
self.setupPortalCertificateAuthority() self.setupPortalCertificateAuthority()
self.setupPayZenInterface() self.setupPayZenInterface()
self.setUpMemcached()
import random import random
self.portal.portal_caches.erp5_site_global_id = '%s' % random.random() self.portal.portal_caches.erp5_site_global_id = '%s' % random.random()
self.portal.portal_caches._p_changed = 1 self.portal.portal_caches._p_changed = 1
......
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