[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content/tests - test_dtmlpageeval.py:1.7 test_zptpageeval.py:1.8

Jim Fulton jim at zope.com
Sun Sep 21 13:31:04 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/content/tests
In directory cvs.zope.org:/tmp/cvs-serv12171/src/zope/app/browser/content/tests

Modified Files:
	test_dtmlpageeval.py test_zptpageeval.py 
Log Message:
No longer need context wrappers methods.

Use contained helper function to set up a containment relationship.


=== Zope3/src/zope/app/browser/content/tests/test_dtmlpageeval.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/content/tests/test_dtmlpageeval.py:1.6	Wed Aug  6 10:41:49 2003
+++ Zope3/src/zope/app/browser/content/tests/test_dtmlpageeval.py	Sun Sep 21 13:30:33 2003
@@ -17,8 +17,7 @@
 """
 from unittest import TestCase, main, makeSuite
 from zope.app.browser.content.dtmlpageeval import DTMLPageEval
-from zope.app.context import ContextWrapper
-
+from zope.app.container.contained import contained
 class Test(TestCase):
 
     def test(self):
@@ -45,7 +44,7 @@
                 setattr(self, name, value)
 
         request = Request()
-        template = ContextWrapper(Template(), folder)
+        template = contained(Template(), folder, 'foo')
 
         view = DTMLPageEval()
         # Do manually, since directive adds BrowserView as base class


=== Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py:1.7	Wed Aug  6 10:41:49 2003
+++ Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py	Sun Sep 21 13:30:33 2003
@@ -21,7 +21,7 @@
 from zope.testing.cleanup import CleanUp # Base class w registry cleanup
 
 from zope.app.browser.content.zpt import ZPTPageEval
-from zope.app.context import ContextWrapper
+from zope.app.container.contained import contained
 
 class Test(CleanUp, TestCase):
 
@@ -48,7 +48,7 @@
 
         request = Request()
 
-        template = ContextWrapper(Template(), folder)
+        template = contained(Template(), folder)
 
         view = ZPTPageEval()
         # Do manually, since directive adds BrowserView as base class




More information about the Zope3-Checkins mailing list