[Zope3-checkins] CVS: Zope3/src/zope/app/browser/security/grants/tests - test_principalpermissionview.py:1.3 test_principalroleview.py:1.3 test_rolepermissionview.py:1.3
R. Sean Bowman
sean.bowman@acm.org
Thu, 6 Feb 2003 01:50:13 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/security/grants/tests
In directory cvs.zope.org:/tmp/cvs-serv18167/zope/app/browser/security/grants/tests
Modified Files:
test_principalpermissionview.py test_principalroleview.py
test_rolepermissionview.py
Log Message:
finished changing service names to use strings defined in
zope/component/servicenames.py, changed the name of
ErrorReportingService to ErrorReports and Resources to ResourceService
=== Zope3/src/zope/app/browser/security/grants/tests/test_principalpermissionview.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/security/grants/tests/test_principalpermissionview.py:1.2 Wed Dec 25 09:12:35 2002
+++ Zope3/src/zope/app/browser/security/grants/tests/test_principalpermissionview.py Thu Feb 6 01:49:09 2003
@@ -19,6 +19,8 @@
import unittest
from zope.component import getService, getServiceManager
+from zope.component.servicenames import Permissions, Adapters
+from zope.component.servicenames import Authentication
from zope.app.interfaces.annotation import IAttributeAnnotatable
from zope.app.interfaces.annotation import IAnnotations
from zope.app.attributeannotations import AttributeAnnotations
@@ -140,20 +142,20 @@
provideService=getServiceManager(None).provideService
defineService(
- 'Permissions', IPermissionService)
- provideService('Permissions',
+ Permissions, IPermissionService)
+ provideService(Permissions,
DummyPermissionService(self._permissions))
- defineService('Authentication',
+ defineService(Authentication,
IAuthenticationService)
self._principals = []
self._principals.append(DummyObject('foo', 'Foo'))
self._principals.append(DummyObject('bar', 'Bar'))
- provideService('Authentication',
+ provideService(Authentication,
DummyAuthenticationService(principals = self._principals))
- provideAdapter=getService(None,'Adapters').provideAdapter
+ provideAdapter=getService(None,Adapters).provideAdapter
provideAdapter(IAttributeAnnotatable,
IPrincipalPermissionManager, DummyAdapter)
provideAdapter(
=== Zope3/src/zope/app/browser/security/grants/tests/test_principalroleview.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/security/grants/tests/test_principalroleview.py:1.2 Wed Dec 25 09:12:35 2002
+++ Zope3/src/zope/app/browser/security/grants/tests/test_principalroleview.py Thu Feb 6 01:49:09 2003
@@ -21,6 +21,7 @@
from zope.app.services.tests.placefulsetup\
import PlacefulSetup
from zope.component import getServiceManager
+from zope.component.servicenames import Roles, Authentication
from zope.app.interfaces.security import IRoleService
from zope.app.interfaces.security import IAuthenticationService
@@ -83,17 +84,17 @@
defineService=getServiceManager(None).defineService
provideService=getServiceManager(None).provideService
- defineService('Roles', IRoleService)
- provideService('Roles'
+ defineService(Roles, IRoleService)
+ provideService(Roles
, DummyRoleService(roles = self._roles))
- defineService('Authentication', IAuthenticationService)
+ defineService(Authentication, IAuthenticationService)
self._principals = []
self._principals.append(DummyObject('foo', 'Foo'))
self._principals.append(DummyObject('bar', 'Bar'))
- provideService('Authentication',
+ provideService(Authentication,
DummyAuthenticationService(principals = self._principals))
def _makeOne(self):
=== Zope3/src/zope/app/browser/security/grants/tests/test_rolepermissionview.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/security/grants/tests/test_rolepermissionview.py:1.2 Wed Dec 25 09:12:35 2002
+++ Zope3/src/zope/app/browser/security/grants/tests/test_rolepermissionview.py Thu Feb 6 01:49:09 2003
@@ -15,6 +15,7 @@
from zope.app.services.tests.placefulsetup\
import PlacefulSetup
from zope.component import getServiceManager
+from zope.component.servicenames import Roles, Permissions
from zope.app.interfaces.security import IRoleService
from zope.app.browser.security.grants.tests.roleservice import RoleService
from zope.app.browser.security.grants.tests.permissionservice import PermissionService
@@ -29,11 +30,11 @@
PlacefulSetup.setUp(self)
defineService=getServiceManager(None).defineService
provideService=getServiceManager(None).provideService
- defineService('Roles', IRoleService)
- provideService('Roles', RoleService(
+ defineService(Roles, IRoleService)
+ provideService(Roles, RoleService(
manager='Manager', member='Member'))
- defineService('Permissions', IPermissionService)
- provideService('Permissions', PermissionService(
+ defineService(Permissions, IPermissionService)
+ provideService(Permissions, PermissionService(
read='Read', write='Write'))
self.view = RolePermissionView(RolePermissionManager(), None)