[Zope3-checkins] CVS: Zope3/src/zope/app/tests - setup.py:1.10

Stuart Bishop zen at shangri-la.dropbear.id.au
Mon Feb 9 00:17:08 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv20093/src/zope/app/tests

Modified Files:
	setup.py 
Log Message:
Session work to HEAD


=== Zope3/src/zope/app/tests/setup.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/tests/setup.py:1.9	Mon Feb  2 15:48:01 2004
+++ Zope3/src/zope/app/tests/setup.py	Mon Feb  9 00:16:31 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