[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/ Use
current registration apis.
Jim Fulton
jim at zope.com
Sat Apr 22 11:02:27 EDT 2006
Log message for revision 67271:
Use current registration apis.
Changed:
U Zope3/branches/jim-adapter/src/zope/app/security/permission.py
U Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/security/permission.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/security/permission.py 2006-04-22 14:55:51 UTC (rev 67270)
+++ Zope3/branches/jim-adapter/src/zope/app/security/permission.py 2006-04-22 15:02:26 UTC (rev 67271)
@@ -58,9 +58,9 @@
>>> perm1 = LocalPermission('Permission 1', 'A first permission')
>>> perm1.id
u'<permission not activated>'
-
- >>> from zope.app.component import registration
- >>> event = registration.RegistrationActivatedEvent(
+
+ >>> import zope.component.interfaces
+ >>> event = zope.component.interfaces.Registered(
... Registration(perm1, 'perm1'))
Now we pass the event into this function, and the id of the permission
Modified: Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py 2006-04-22 14:55:51 UTC (rev 67270)
+++ Zope3/branches/jim-adapter/src/zope/app/testing/ztapi.py 2006-04-22 15:02:26 UTC (rev 67271)
@@ -88,7 +88,7 @@
def unprovideUtility(provided, name=''):
gsm = zope.component.getGlobalSiteManager()
- gsm.provideAdapter((), provided, name, None)
+ gsm.unregisterUtility(provided=provided, name=name)
def provideNamespaceHandler(name, handler):
provideAdapter(None, ITraversable, handler, name=name)
More information about the Zope3-Checkins
mailing list