[Zope3-checkins]
SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/publisher/xmlrpc/ftests.py
Added code to clean up views registered by the test.
Jim Fulton
jim at zope.com
Fri Aug 27 16:41:19 EDT 2004
Log message for revision 27308:
Added code to clean up views registered by the test.
Changed:
U Zope3/branches/ZopeX3-3.0/src/zope/app/publisher/xmlrpc/ftests.py
-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/publisher/xmlrpc/ftests.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/publisher/xmlrpc/ftests.py 2004-08-27 20:13:49 UTC (rev 27307)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/publisher/xmlrpc/ftests.py 2004-08-27 20:41:19 UTC (rev 27308)
@@ -16,6 +16,10 @@
$Id$
"""
import sys
+import zope.interface
+import zope.app.folder.folder
+import zope.publisher.interfaces.xmlrpc
+from zope.app.tests import ztapi
# Evil hack to make pickling work with classes defined in doc tests
class NoCopyDict(dict):
@@ -40,6 +44,26 @@
sys.modules[name] = FakeModule(globs)
def tearDown():
+ # clean up the views we registered:
+
+ # we use the fact that registering None unregisters whatever is
+ # registered. We can't use an unregistration call because that
+ # requires the object that was registered and we don't have that handy.
+ # (OK, we could get it if we want. Maybe later.)
+
+ ztapi.provideView(zope.app.folder.folder.IFolder,
+ zope.publisher.interfaces.xmlrpc.IXMLRPCRequest,
+ zope.interface,
+ 'contents',
+ None,
+ )
+ ztapi.provideView(zope.app.folder.folder.IFolder,
+ zope.publisher.interfaces.xmlrpc.IXMLRPCRequest,
+ zope.interface,
+ 'contents',
+ None,
+ )
+
globs.clear()
del sys.modules[name]
More information about the Zope3-Checkins
mailing list