[Zope3-checkins] CVS: Zope3/src/zope/app/publication/tests - test_browserpublication.py:1.5

Jeremy Hylton jeremy@zope.com
Mon, 20 Jan 2003 17:16:03 -0500


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

Modified Files:
	test_browserpublication.py 
Log Message:
Add global statement to make classes pickleable.
Reorganzie some imports.


=== Zope3/src/zope/app/publication/tests/test_browserpublication.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/publication/tests/test_browserpublication.py:1.4	Tue Dec 31 13:26:58 2002
+++ Zope3/src/zope/app/publication/tests/test_browserpublication.py	Mon Jan 20 17:16:00 2003
@@ -18,16 +18,13 @@
 from zope.component import getService, getServiceManager
 
 from zope.publisher.publish import publish
-from zope.publisher.browser import TestRequest
-from zope.publisher.browser import BrowserView
-from zope.publisher.interfaces.browser import IBrowserPublisher
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.browser import BrowserView, TestRequest
+from zope.publisher.interfaces.browser \
+     import IBrowserPresentation, IBrowserPublisher
 
 from zope.proxy.context import getWrapperContext, wrapperTypes
 from zope.proxy.introspection import removeAllProxies
 from zope.security.proxy import Proxy, getObject
-
-
 from zope.security.checker import defineChecker, NamesChecker
 
 from zope.app.security.registries.principalregistry import principalRegistry
@@ -38,8 +35,6 @@
 from zope.app.publication.traversers import TestTraverser
 from zope.app.publication.tests.test_zopepublication \
      import BasePublicationTests as BasePublicationTests_
-from zope.security.checker import NamesChecker
-
 
 def foo():
     " "
@@ -102,6 +97,9 @@
 
 
     def _testBaseTags(self, url, expected):
+        # Make sure I1 and O1 are visible in the module namespace
+        # so that the classes can be pickled.
+        global I1, O1
 
         class I1(Interface): pass