[Zope3-checkins] CVS: Zope3/src/zope/app/tests - ztapi.py:1.10
Jim Fulton
jim at zope.com
Fri Apr 23 15:39:32 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv14581/src/zope/app/tests
Modified Files:
ztapi.py
Log Message:
Added a function to unregister a utility, so that functional tests
that register utilities can clean up after themselves
=== Zope3/src/zope/app/tests/ztapi.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/tests/ztapi.py:1.9 Fri Apr 23 07:38:57 2004
+++ Zope3/src/zope/app/tests/ztapi.py Fri Apr 23 15:39:31 2004
@@ -77,6 +77,10 @@
def provideUtility(provided, component, name=''):
s = zapi.getService(None, Utilities)
s.provideUtility(provided, component, name)
+
+def unprovideUtility(provided, name=''):
+ s = zapi.getService(None, Utilities)
+ s.register((), provided, name, None)
def provideNamespaceHandler(name, handler):
provideAdapter(None, ITraversable, handler, name=name)
More information about the Zope3-Checkins
mailing list