[Zope-Checkins] SVN: Zope/trunk/src/OFS/tests/testCache.py Avoid deprecation warning and some PEP8
Hanno Schlichting
hannosch at hannosch.eu
Sat Jun 19 07:03:25 EDT 2010
Log message for revision 113634:
Avoid deprecation warning and some PEP8
Changed:
U Zope/trunk/src/OFS/tests/testCache.py
-=-
Modified: Zope/trunk/src/OFS/tests/testCache.py
===================================================================
--- Zope/trunk/src/OFS/tests/testCache.py 2010-06-19 08:40:16 UTC (rev 113633)
+++ Zope/trunk/src/OFS/tests/testCache.py 2010-06-19 11:03:24 UTC (rev 113634)
@@ -3,20 +3,22 @@
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'))
More information about the Zope-Checkins
mailing list