[CMF-checkins] CVS: CMF/CMFCore/tests -
test_MembershipTool.py:1.2.14.3
Yvo Schubbe
schubbe at web.de
Mon Sep 29 07:12:37 EDT 2003
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv25044/CMFCore/tests
Modified Files:
Tag: CMF-1_4-branch
test_MembershipTool.py
Log Message:
fixed getCandidateLocalRoles:
- filter out 'Member' correctly (Collector #148 and #169)
- also filter out 'Authenticated'
=== CMF/CMFCore/tests/test_MembershipTool.py 1.2.14.2 => 1.2.14.3 ===
--- CMF/CMFCore/tests/test_MembershipTool.py:1.2.14.2 Wed Jun 11 07:10:43 2003
+++ CMF/CMFCore/tests/test_MembershipTool.py Mon Sep 29 07:12:36 2003
@@ -11,12 +11,13 @@
except ImportError:
# for Zope versions before 2.6.0
from Interface import verify_class_implementation as verifyClass
+from AccessControl.SecurityManagement import newSecurityManager
-from Products.CMFCore.PortalFolder import PortalFolder
-from Products.CMFCore.tests.base.dummy import DummySite
-from Products.CMFCore.tests.base.dummy import DummyTool
-from Products.CMFCore.tests.base.dummy import DummyUserFolder
-from Products.CMFCore.tests.base.testcase import SecurityTest
+from Products.CMFCore.PortalFolder import PortalFolder
+from Products.CMFCore.tests.base.dummy import DummySite
+from Products.CMFCore.tests.base.dummy import DummyTool
+from Products.CMFCore.tests.base.dummy import DummyUserFolder
+from Products.CMFCore.tests.base.testcase import SecurityTest
from Products.CMFCore.MembershipTool import MembershipTool
@@ -39,6 +40,14 @@
SecurityTest.setUp(self)
self.site = DummySite('site').__of__(self.root)
self.mtool = MembershipTool().__of__(self.site)
+
+ def test_getCandidateLocalRoles(self):
+ mtool = self.mtool
+ acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
+
+ newSecurityManager(None, acl_users.user_foo)
+ rval = mtool.getCandidateLocalRoles(mtool)
+ self.assertEqual( rval, ('Dummy',) )
def test_createMemberarea(self):
mtool = self.mtool
More information about the CMF-checkins
mailing list