[CMF-checkins] CVS: CMF/CMFCore/tests - test_DiscussionTool.py:1.1.2.1 test_SkinsTool.py:1.1.2.1 test_UndoTool.py:1.1.2.1
Yvo Schubbe
schubbe@web.de
Thu, 19 Dec 2002 17:09:45 -0500
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv8544/CMFCore/tests
Added Files:
Tag: yuppie-collector096-branch
test_DiscussionTool.py test_SkinsTool.py test_UndoTool.py
Log Message:
tool interface cleanup:
- added interface tests and made them pass
=== Added File CMF/CMFCore/tests/test_DiscussionTool.py ===
from unittest import TestCase, TestSuite, makeSuite, main
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.DiscussionTool import DiscussionTool
class DiscussionToolTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_discussion \
import oldstyle_portal_discussion as IOldstyleDiscussionTool
verifyClass(IOldstyleDiscussionTool, DiscussionTool)
def test_suite():
return TestSuite((
makeSuite( DiscussionToolTests ),
))
if __name__ == '__main__':
main(defaultTest='test_suite')
=== Added File CMF/CMFCore/tests/test_SkinsTool.py ===
from unittest import TestCase, TestSuite, makeSuite, main
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.SkinsTool import SkinsTool
class SkinsToolTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_skins \
import portal_skins as ISkinsTool
from Products.CMFCore.interfaces.portal_actions \
import ActionProvider as IActionProvider
verifyClass(ISkinsTool, SkinsTool)
verifyClass(IActionProvider, SkinsTool)
def test_suite():
return TestSuite((
makeSuite( SkinsToolTests ),
))
if __name__ == '__main__':
main(defaultTest='test_suite')
=== Added File CMF/CMFCore/tests/test_UndoTool.py ===
from unittest import TestCase, TestSuite, makeSuite, main
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.UndoTool import UndoTool
class UndoToolTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_undo \
import portal_undo as IUndoTool
from Products.CMFCore.interfaces.portal_actions \
import ActionProvider as IActionProvider
verifyClass(IUndoTool, UndoTool)
verifyClass(IActionProvider, UndoTool)
def test_suite():
return TestSuite((
makeSuite( UndoToolTests ),
))
if __name__ == '__main__':
main(defaultTest='test_suite')