Commit 43bd93f8 authored by Nicolas Delaby's avatar Nicolas Delaby

Create one Memcached Plugin in test

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27497 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7234e91f
# -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -51,6 +52,14 @@ class TestMemcachedTool(ERP5TypeTestCase): ...@@ -51,6 +52,14 @@ class TestMemcachedTool(ERP5TypeTestCase):
def setUp(self): def setUp(self):
ERP5TypeTestCase.setUp(self) ERP5TypeTestCase.setUp(self)
installRealMemcachedTool(self.getPortal()) installRealMemcachedTool(self.getPortal())
memcached_tool = self.getPortal().portal_memcached
#create Memcache Plugin
if getattr(memcached_tool, 'default_memcached_plugin', None) is None:
memcached_tool.newContent(portal_type='Memcached Plugin',
int_index=0,
url_string='127.0.0.1:11211')
transaction.commit()
self.tic()
def afterSetUp(self): def afterSetUp(self):
self.login() self.login()
...@@ -96,7 +105,7 @@ class TestMemcachedTool(ERP5TypeTestCase): ...@@ -96,7 +105,7 @@ class TestMemcachedTool(ERP5TypeTestCase):
'__guarded_delitem__') '__guarded_delitem__')
for attribut_id in tested_attribute_id_list: for attribut_id in tested_attribute_id_list:
self.assertTrue(getattr(tested_dict, attribut_id, None) is not None) self.assertTrue(getattr(tested_dict, attribut_id, None) is not None)
def test_02_insertValue(self): def test_02_insertValue(self):
""" """
Tests that inserting an item and reading it gets a consistent result. Tests that inserting an item and reading it gets a consistent result.
......
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