[CMF-checkins] CVS: CMF/CMFCore/tests - test_ActionProviderBase.py:1.7.18.1 test_ActionsTool.py:1.7.2.1
Yvo Schubbe
schubbe@web.de
Thu, 19 Dec 2002 13:20:29 -0500
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv9181/CMFCore/tests
Modified Files:
Tag: yuppie-collector096-branch
test_ActionProviderBase.py test_ActionsTool.py
Log Message:
tool interface cleanup:
- added portal_properties interface
- added interface tests and made them pass
=== CMF/CMFCore/tests/test_ActionProviderBase.py 1.7 => 1.7.18.1 ===
--- CMF/CMFCore/tests/test_ActionProviderBase.py:1.7 Wed Jul 3 10:07:40 2002
+++ CMF/CMFCore/tests/test_ActionProviderBase.py Thu Dec 19 13:20:29 2002
@@ -1,5 +1,10 @@
import unittest
import Zope
+try:
+ from Interface.Verify import verifyClass
+except ImportError:
+ # for Zope versions before 2.6.0
+ from Interface import verify_class_implementation as verifyClass
from Products.CMFCore.tests.base.dummy import DummyTool
@@ -141,6 +146,12 @@
another_ids = map( idify, another.listActions() )
self.failIf( one_ids == another_ids )
self.assertEqual( old_ids, another_ids )
+
+ def test_interface(self):
+ from Products.CMFCore.interfaces.portal_actions \
+ import ActionProvider as IActionProvider
+
+ verifyClass(IActionProvider, ActionProviderBase)
def test_suite():
return unittest.TestSuite((
=== CMF/CMFCore/tests/test_ActionsTool.py 1.7 => 1.7.2.1 ===
--- CMF/CMFCore/tests/test_ActionsTool.py:1.7 Wed Dec 11 17:20:36 2002
+++ CMF/CMFCore/tests/test_ActionsTool.py Thu Dec 19 13:20:29 2002
@@ -1,5 +1,11 @@
+from unittest import TestCase, TestSuite, makeSuite, main
+
import Zope
-from unittest import TestCase,TestSuite,makeSuite,main
+try:
+ from Interface.Verify import verifyClass
+except ImportError:
+ # for Zope versions before 2.6.0
+ from Interface import verify_class_implementation as verifyClass
from Products.CMFCore.tests.base.testcase import \
SecurityRequestTest
@@ -10,8 +16,8 @@
from Products.CMFCore.ActionInformation import ActionInformation
from Products.CMFCore.Expression import Expression
from Products.CMFCore.URLTool import URLTool
-from Products.CMFDefault.RegistrationTool import RegistrationTool
-from Products.CMFDefault.MembershipTool import MembershipTool
+from Products.CMFCore.RegistrationTool import RegistrationTool
+from Products.CMFCore.MembershipTool import MembershipTool
class ActionsToolTests( SecurityRequestTest ):
@@ -116,6 +122,16 @@
'name': 'Test',
'visible': 1,
'category': 'object'}])
+
+ def test_interface(self):
+ from Products.CMFCore.interfaces.portal_actions \
+ import portal_actions as IActionsTool
+ from Products.CMFCore.interfaces.portal_actions \
+ import ActionProvider as IActionProvider
+
+ verifyClass(IActionsTool, ActionsTool)
+ verifyClass(IActionProvider, ActionsTool)
+
def test_suite():
return TestSuite((