Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
erp5
Commits
2c85d24d
Commit
2c85d24d
authored
Jun 11, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix text on slapos environment
Use ERP5TypeTestCase API to get hostname and port for memcached.
parent
9bb4ea16
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
product/ERP5Type/tests/testMemcachedTool.py
product/ERP5Type/tests/testMemcachedTool.py
+5
-2
No files found.
product/ERP5Type/tests/testMemcachedTool.py
View file @
2c85d24d
...
...
@@ -34,6 +34,8 @@ import transaction
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5Type.tests.utils
import
installRealMemcachedTool
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
\
_getVolatileMemcachedServerDict
import
time
class
TestMemcachedTool
(
ERP5TypeTestCase
):
...
...
@@ -57,17 +59,18 @@ class TestMemcachedTool(ERP5TypeTestCase):
installRealMemcachedTool
(
self
.
getPortal
())
memcached_tool
=
self
.
getPortal
().
portal_memcached
#create Memcache Plugin
url_string
=
"%(hostname)s:%(port)s"
%
_getVolatileMemcachedServerDict
()
if
getattr
(
memcached_tool
,
'default_memcached_plugin'
,
None
)
is
None
:
memcached_tool
.
newContent
(
id
=
'default_memcached_plugin'
,
portal_type
=
'Memcached Plugin'
,
int_index
=
0
,
url_string
=
'127.0.0.1:11211'
)
url_string
=
url_string
)
if
getattr
(
memcached_tool
,
'memcached_plugin_with_expiration'
,
None
)
is
None
:
memcached_tool
.
newContent
(
id
=
'memcached_plugin_with_expiration'
,
portal_type
=
'Memcached Plugin'
,
int_index
=
1
,
expiration_time
=
self
.
expiration_time
,
url_string
=
'127.0.0.1:11211'
)
url_string
=
url_string
)
transaction
.
commit
()
self
.
tic
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment