[Zope3-checkins] CVS: Zope3/src/zope/app/browser/security/grants/tests - permissionservice.py:1.5 rolepermissionmanager.py:1.5 roleservice.py:1.5 test_principalpermissionview.py:1.8 test_principalroleview.py:1.9
Steve Alexander
steve@cat-box.net
Fri, 6 Jun 2003 16:44:58 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/security/grants/tests
In directory cvs.zope.org:/tmp/cvs-serv19301/src/zope/app/browser/security/grants/tests
Modified Files:
permissionservice.py rolepermissionmanager.py roleservice.py
test_principalpermissionview.py test_principalroleview.py
Log Message:
yet another batch of updated interface declarations
=== Zope3/src/zope/app/browser/security/grants/tests/permissionservice.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/security/grants/tests/permissionservice.py:1.4 Tue Mar 11 11:10:48 2003
+++ Zope3/src/zope/app/browser/security/grants/tests/permissionservice.py Fri Jun 6 16:44:27 2003
@@ -19,10 +19,11 @@
from zope.app.interfaces.security import IPermissionService
from zope.app.interfaces.security import IPermission
from zope.app.interfaces.services.service import ISimpleService
+from zope.interface import implements
class Permission:
- __implements__ = IPermission
+ implements(IPermission)
def __init__(self, id, title): self._id, self._title = id, title
def getId(self): return self._id
@@ -31,7 +32,7 @@
class PermissionService:
- __implements__ = IPermissionService, ISimpleService
+ implements(IPermissionService, ISimpleService)
def __init__(self, **kw):
self._permissions = r = {}
=== Zope3/src/zope/app/browser/security/grants/tests/rolepermissionmanager.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/security/grants/tests/rolepermissionmanager.py:1.4 Wed Apr 30 19:37:55 2003
+++ Zope3/src/zope/app/browser/security/grants/tests/rolepermissionmanager.py Fri Jun 6 16:44:27 2003
@@ -20,13 +20,14 @@
from zope.app.interfaces.security import IRolePermissionMap
from zope.app.security.grants.securitymap import SecurityMap
from zope.app.security.settings import Allow, Deny, Unset
+from zope.interface import implements
class RolePermissionManager:
"""
provide adapter that manages role permission data in an object attribute
"""
- __implements__ = IRolePermissionManager, IRolePermissionMap
+ implements(IRolePermissionManager, IRolePermissionMap)
def __init__(self):
self._rp = SecurityMap()
=== Zope3/src/zope/app/browser/security/grants/tests/roleservice.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/security/grants/tests/roleservice.py:1.4 Tue Mar 11 11:10:48 2003
+++ Zope3/src/zope/app/browser/security/grants/tests/roleservice.py Fri Jun 6 16:44:27 2003
@@ -19,10 +19,11 @@
from zope.app.interfaces.security import IRoleService
from zope.app.interfaces.security import IRole
from zope.app.interfaces.services.service import ISimpleService
+from zope.interface import implements
class Role:
- __implements__ = IRole
+ implements(IRole)
def __init__(self, id, title): self._id, self._title = id, title
def getId(self): return self._id
@@ -31,7 +32,7 @@
class RoleService:
- __implements__ = IRoleService, ISimpleService
+ implements(IRoleService, ISimpleService)
def __init__(self, **kw):
self._roles = r = {}
=== Zope3/src/zope/app/browser/security/grants/tests/test_principalpermissionview.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/security/grants/tests/test_principalpermissionview.py:1.7 Tue Mar 11 11:10:48 2003
+++ Zope3/src/zope/app/browser/security/grants/tests/test_principalpermissionview.py Fri Jun 6 16:44:27 2003
@@ -33,15 +33,16 @@
from zope.app.services.tests.placefulsetup \
import PlacefulSetup
from zope.app.interfaces.services.service import ISimpleService
+from zope.interface import implements
class DummyContext:
- __implements__ = IAttributeAnnotatable
+ implements(IAttributeAnnotatable)
#IPrincipalPermissionManager, IPrincipalPermissionMap
class DummyPermissionService:
- __implements__ = IPermissionService, ISimpleService
+ implements(IPermissionService, ISimpleService)
def __init__(self, perm_objs):
perms = {}
@@ -58,7 +59,7 @@
class DummyAuthenticationService:
- __implements__ = IAuthenticationService, ISimpleService
+ implements(IAuthenticationService, ISimpleService)
def __init__(self, principals):
pr = {}
@@ -71,7 +72,7 @@
class DummyAdapter:
- __implements__ = IPrincipalPermissionManager, IPrincipalPermissionMap
+ implements(IPrincipalPermissionManager, IPrincipalPermissionMap)
def __init__(self, context):
self._context = context
=== Zope3/src/zope/app/browser/security/grants/tests/test_principalroleview.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/browser/security/grants/tests/test_principalroleview.py:1.8 Wed Apr 30 19:37:55 2003
+++ Zope3/src/zope/app/browser/security/grants/tests/test_principalroleview.py Fri Jun 6 16:44:27 2003
@@ -29,6 +29,7 @@
from zope.app.interfaces.security import IPrincipalRoleManager
from zope.publisher.browser import TestRequest
from zope.app.interfaces.services.service import ISimpleService
+from zope.interface import implements
class DummySetting:
def __init__(self, name):
@@ -38,14 +39,14 @@
class DummyManager:
- __implements__ = IPrincipalRoleManager
+ implements(IPrincipalRoleManager)
def getSetting(self, role, principal):
return DummySetting('%r:%r' % (role, principal))
class DummyRoleService:
- __implements__ = IRoleService, ISimpleService
+ implements(IRoleService, ISimpleService)
def __init__(self, roles):
self._roles = roles
@@ -66,7 +67,7 @@
class DummyAuthenticationService:
- __implements__ = IAuthenticationService, ISimpleService
+ implements(IAuthenticationService, ISimpleService)
def __init__(self, principals):
self._principals = principals