Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
0
Merge Requests
0
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
Kirill Smelkov
Zope
Commits
520e1e69
Commit
520e1e69
authored
Jun 19, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid deprecation warning and some PEP8
parent
7f7d26ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/OFS/tests/testCache.py
src/OFS/tests/testCache.py
+4
-2
No files found.
src/OFS/tests/testCache.py
View file @
520e1e69
...
...
@@ -3,20 +3,22 @@ import unittest
from
OFS.Cache
import
CacheManager
from
OFS.Folder
import
Folder
from
OFS.SimpleItem
import
SimpleItem
from
Products.Five.eventconfigure
import
setDeprecatedManageAddDelete
from
OFS.metaconfigure
import
setDeprecatedManageAddDelete
class
DummyCacheManager
(
CacheManager
,
SimpleItem
):
def
__init__
(
self
,
id
,
*
args
,
**
kw
):
self
.
id
=
id
setDeprecatedManageAddDelete
(
DummyCacheManager
)
class
CacheTests
(
unittest
.
TestCase
):
def
test_managersExist
(
self
):
from
OFS.Cache
import
managersExist
from
OFS.DTMLMethod
import
DTMLMethod
root
=
Folder
(
'root'
)
root
.
_setObject
(
'root_cache'
,
DummyCacheManager
(
'root_cache'
))
root
.
_setObject
(
'root_cache'
,
DummyCacheManager
(
'root_cache'
))
root
.
_setObject
(
'child'
,
Folder
(
'child'
))
root
.
child
.
_setObject
(
'child_cache'
,
DummyCacheManager
(
'child_cache'
))
root
.
child
.
_setObject
(
'child_content'
,
DTMLMethod
(
'child_content'
))
...
...
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