[CMF-checkins] CVS: CMF/CMFDefault/tests - test_PropertiesTool.py:1.1.2.1 test_RegistrationTool.py:1.1.2.1
Yvo Schubbe
schubbe@web.de
Thu, 19 Dec 2002 13:21:18 -0500
Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv9455/CMFDefault/tests
Added Files:
Tag: yuppie-collector096-branch
test_PropertiesTool.py test_RegistrationTool.py
Log Message:
tool interface cleanup:
- added portal_properties interface
- added interface tests and made them pass
=== Added File CMF/CMFDefault/tests/test_PropertiesTool.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.CMFDefault.PropertiesTool import PropertiesTool
class PropertiesToolTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_properties \
import portal_properties as IPropertiesTool
from Products.CMFCore.interfaces.portal_actions \
import ActionProvider as IActionProvider
verifyClass(IPropertiesTool, PropertiesTool)
verifyClass(IActionProvider, PropertiesTool)
def test_suite():
return TestSuite((
makeSuite( PropertiesToolTests ),
))
if __name__ == '__main__':
main(defaultTest='test_suite')
=== Added File CMF/CMFDefault/tests/test_RegistrationTool.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.CMFDefault.RegistrationTool import RegistrationTool
class RegistrationToolTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_registration \
import portal_registration as IRegistrationTool
from Products.CMFCore.interfaces.portal_actions \
import ActionProvider as IActionProvider
verifyClass(IRegistrationTool, RegistrationTool)
verifyClass(IActionProvider, RegistrationTool)
def test_suite():
return TestSuite((
makeSuite( RegistrationToolTests ),
))
if __name__ == '__main__':
main(defaultTest='test_suite')