[CMF-checkins] SVN: CMF/trunk/CMFActionIcons/ - fixed interface
declarations
Yvo Schubbe
y.2007- at wcm-solutions.de
Sun Mar 11 08:44:09 EDT 2007
Log message for revision 73138:
- fixed interface declarations
Changed:
U CMF/trunk/CMFActionIcons/ActionIconsTool.py
U CMF/trunk/CMFActionIcons/tests/test_ActionIconsTool.py
-=-
Modified: CMF/trunk/CMFActionIcons/ActionIconsTool.py
===================================================================
--- CMF/trunk/CMFActionIcons/ActionIconsTool.py 2007-03-11 12:43:51 UTC (rev 73137)
+++ CMF/trunk/CMFActionIcons/ActionIconsTool.py 2007-03-11 12:44:09 UTC (rev 73138)
@@ -17,14 +17,13 @@
import os
+from AccessControl import ClassSecurityInfo
from Globals import InitializeClass
from Globals import package_home
-from AccessControl import ClassSecurityInfo
from OFS.SimpleItem import SimpleItem
-
+from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from zope.interface import implements
-from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.CMFCore.Expression import Expression
from Products.CMFCore.utils import registerToolInterface
from Products.CMFCore.utils import UniqueObject
@@ -35,12 +34,11 @@
_wwwdir = os.path.join( package_home( globals() ), 'www' )
+
class ActionIcon( SimpleItem ):
security = ClassSecurityInfo()
- implements(IActionIconsTool)
-
_title = None # Use the one supplied by the provider
_priority = 0 # All animals are equal....
_category = 'object'
@@ -118,6 +116,9 @@
""" Map actions only icons.
"""
+
+ implements(IActionIconsTool)
+
meta_type = 'Action Icons Tool'
id = 'portal_actionicons'
@@ -426,4 +427,3 @@
InitializeClass( ActionIconsTool )
registerToolInterface('portal_actionicons', IActionIconsTool)
-
Modified: CMF/trunk/CMFActionIcons/tests/test_ActionIconsTool.py
===================================================================
--- CMF/trunk/CMFActionIcons/tests/test_ActionIconsTool.py 2007-03-11 12:43:51 UTC (rev 73137)
+++ CMF/trunk/CMFActionIcons/tests/test_ActionIconsTool.py 2007-03-11 12:44:09 UTC (rev 73138)
@@ -18,7 +18,9 @@
import unittest
import Testing
+from zope.interface.verify import verifyClass
+
class ActionIconToolTests(unittest.TestCase):
def _makeOne( self, *args, **kw ):
@@ -27,6 +29,12 @@
return ActionIconsTool( *args, **kw )
+ def test_interfaces(self):
+ from Products.CMFActionIcons.ActionIconsTool import ActionIconsTool
+ from Products.CMFActionIcons.interfaces import IActionIconsTool
+
+ verifyClass(IActionIconsTool, ActionIconsTool)
+
def test_empty( self ):
tool = self._makeOne()
More information about the CMF-checkins
mailing list