[Zope3-checkins] CVS: Zope3/src/zope/app/tests - setup.py:1.9.6.1
Stuart Bishop
zen at shangri-la.dropbear.id.au
Sun Feb 8 22:09:35 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv27663/src/zope/app/tests
Modified Files:
Tag: ozzope-session-branch
setup.py
Log Message:
Work in progress - API solidifying
=== Zope3/src/zope/app/tests/setup.py 1.9 => 1.9.6.1 ===
--- Zope3/src/zope/app/tests/setup.py:1.9 Mon Feb 2 15:48:01 2004
+++ Zope3/src/zope/app/tests/setup.py Sun Feb 8 22:08:58 2004
@@ -159,9 +159,10 @@
This utility is useful for tests that need to set up utilities.
"""
+ folder_name = name + suffix
default = zapi.traverse(servicemanager, 'default')
- default[name+suffix] = utility
- path = "%s/default/%s" % (zapi.getPath(servicemanager), name+suffix)
+ default[folder_name] = utility
+ path = "%s/default/%s" % (zapi.getPath(servicemanager), folder_name)
registration = UtilityRegistration(name, iface, path)
key = default.getRegistrationManager().addRegistration(registration)
zapi.traverse(default.getRegistrationManager(), key).status = ActiveStatus
@@ -172,8 +173,11 @@
from zope.app.interfaces.services.event import ISubscriptionService
from zope.app.services.event import EventService
from zope.app.services.hub import ObjectHub
+from zope.app.interfaces.services.utility import ILocalUtilityService
+from zope.app.services.utility import LocalUtilityService
from zope.app.services.servicenames import HubIds
from zope.app.services.servicenames import EventPublication, EventSubscription
+from zope.app.services.servicenames import Utilities
def createStandardServices(folder, hubids=None):
'''Create a bunch of standard placeful services
@@ -199,3 +203,7 @@
hubids = ObjectHub()
addService(sm, HubIds, hubids)
+
+ # Utilities service
+ defineService(LocalUtilityService, ILocalUtilityService)
+ addService(sm, Utilities, LocalUtilityService())
More information about the Zope3-Checkins
mailing list