[CMF-checkins] CVS: CMF/CMFCore/tests - test_MemberDataTool.py:1.2.28.1

Yvo Schubbe schubbe at web.de
Tue Sep 9 10:01:22 EDT 2003


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv14535/CMFCore/tests

Modified Files:
      Tag: yuppie-deleteMembers-branch
	test_MemberDataTool.py 
Log Message:
added deleteMemberData method

=== CMF/CMFCore/tests/test_MemberDataTool.py 1.2 => 1.2.28.1 ===
--- CMF/CMFCore/tests/test_MemberDataTool.py:1.2	Mon Jan  6 16:04:33 2003
+++ CMF/CMFCore/tests/test_MemberDataTool.py	Tue Sep  9 09:01:21 2003
@@ -2,6 +2,11 @@
 
 import Zope
 try:
+    Zope.startup()
+except AttributeError:
+    # for Zope versions before 2.6.1
+    pass
+try:
     from Interface.Verify import verifyClass
 except ImportError:
     # for Zope versions before 2.6.0
@@ -12,6 +17,14 @@
 
 
 class MemberDataToolTests(TestCase):
+
+    def test_deleteMemberData(self):
+        tool = MemberDataTool()
+        tool.registerMemberData('Dummy', 'user_foo')
+        self.failUnless( tool._members.has_key('user_foo') )
+        self.failUnless( tool.deleteMemberData('user_foo') )
+        self.failIf( tool._members.has_key('user_foo') )
+        self.failIf( tool.deleteMemberData('user_foo') )
 
     def test_interface(self):
         from Products.CMFCore.interfaces.portal_memberdata \




More information about the CMF-checkins mailing list