[CMF-checkins] CVS: CMF/CMFCore/tests - test_MemberDataTool.py:1.1.2.1 test_MembershipTool.py:1.1.2.1
Yvo Schubbe
schubbe@web.de
Thu, 19 Dec 2002 13:20:59 -0500
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv9277/CMFCore/tests
Added Files:
Tag: yuppie-collector096-branch
test_MemberDataTool.py test_MembershipTool.py
Log Message:
tool interface cleanup:
- added portal_properties interface
- added interface tests and made them pass
=== Added File CMF/CMFCore/tests/test_MemberDataTool.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.MemberDataTool import MemberDataTool
from Products.CMFCore.MemberDataTool import MemberData
class MemberDataToolTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_memberdata \
import portal_memberdata as IMemberDataTool
from Products.CMFCore.interfaces.portal_actions \
import ActionProvider as IActionProvider
verifyClass(IMemberDataTool, MemberDataTool)
verifyClass(IActionProvider, MemberDataTool)
class MemberDataTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_memberdata \
import MemberData as IMemberData
verifyClass(IMemberData, MemberData)
def test_suite():
return TestSuite((
makeSuite( MemberDataToolTests ),
makeSuite( MemberDataTests ),
))
if __name__ == '__main__':
main(defaultTest='test_suite')
=== Added File CMF/CMFCore/tests/test_MembershipTool.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.MembershipTool import MembershipTool
class MembershipToolTests(TestCase):
def test_interface(self):
from Products.CMFCore.interfaces.portal_membership \
import portal_membership as IMembershipTool
from Products.CMFCore.interfaces.portal_actions \
import ActionProvider as IActionProvider
verifyClass(IMembershipTool, MembershipTool)
verifyClass(IActionProvider, MembershipTool)
def test_suite():
return TestSuite((
makeSuite( MembershipToolTests ),
))
if __name__ == '__main__':
main(defaultTest='test_suite')