[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/tests/ztapi.py Sprinting with Jim:

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Oct 13 03:29:50 EDT 2004


Log message for revision 28037:
  Sprinting with Jim:
  
  Added a provideService() ztapi helper function.
  

Changed:
  U   Zope3/trunk/src/zope/app/tests/ztapi.py

-=-
Modified: Zope3/trunk/src/zope/app/tests/ztapi.py
===================================================================
--- Zope3/trunk/src/zope/app/tests/ztapi.py	2004-10-13 07:28:49 UTC (rev 28036)
+++ Zope3/trunk/src/zope/app/tests/ztapi.py	2004-10-13 07:29:49 UTC (rev 28037)
@@ -90,3 +90,10 @@
 def provideNamespaceHandler(name, handler):
     provideAdapter(None, ITraversable, handler, name=name)
     provideView(None, None, ITraversable, name, handler)
+
+def provideService(name, service, interface=None):
+    services = zapi.getGlobalServices()
+    if interface is not None:
+        services.defineService(name, interface)
+    services.provideService(name, service)
+    



More information about the Zope3-Checkins mailing list