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

Jim Fulton jim at zope.com
Tue Sep 23 15:12:31 EDT 2003


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

Modified Files:
	test_browserpublication.py 
Log Message:
Updated a test to make it runnable in a loop.

Changed a test to not to replace a module global that other tests were
depending on.


=== Zope3/src/zope/app/publication/tests/test_browserpublication.py 1.19 => 1.20 ===
--- Zope3/src/zope/app/publication/tests/test_browserpublication.py:1.19	Sun Sep 21 13:31:57 2003
+++ Zope3/src/zope/app/publication/tests/test_browserpublication.py	Tue Sep 23 15:12:31 2003
@@ -42,6 +42,8 @@
 from zope.app.publication.tests.test_zopepublication \
      import BasePublicationTests as BasePublicationTests_
 
+from persistence import Persistent
+
 def foo():
     " "
     return '<html><body>hello base fans</body></html>'
@@ -72,6 +74,20 @@
         request.setPublication(publication)
         return request
 
+class SimpleObject:
+    def __init__(self, v):
+        self.v = v
+
+class I1(Interface):
+    pass
+
+class mydict(dict):
+    implements(I1)
+
+
+class O1(Persistent):
+    implements(I1)
+
 
 class BrowserDefaultTests(BasePublicationTests):
     """
@@ -103,14 +119,6 @@
     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
-
-        from persistence import Persistent
-
-        class O1(Persistent):
-            implements(I1)
 
         pub = BrowserPublication(self.db)
 
@@ -155,17 +163,6 @@
         request.setPublication(publication)
         return request
 
-
-
-class SimpleObject:
-    def __init__(self, v):
-        self.v = v
-
-class I1(Interface):
-    pass
-
-class mydict(dict):
-    implements(I1)
 
 
 class BrowserPublicationTests(BasePublicationTests):




More information about the Zope3-Checkins mailing list