[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_ fix some tests that tried to skimp by not creating a request object

Fred L. Drake, Jr. fdrake at gmail.com
Thu Sep 30 16:50:50 EDT 2004


Log message for revision 27721:
  fix some tests that tried to skimp by not creating a request object
  (not needed on the trunk, since the tests there had already been fixed)
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_binding.py
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_simpleviewclass.py


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_binding.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_binding.py	2004-09-30 20:18:25 UTC (rev 27720)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_binding.py	2004-09-30 20:50:50 UTC (rev 27721)
@@ -36,7 +36,8 @@
         ztapi.provideAdapter(None, ITraversable, DefaultTraversable)
 
     def test_binding(self):
-        comp = PTComponent(Content())
+        from zope.publisher.browser import TestRequest
+        comp = PTComponent(Content(), TestRequest())
         self.assertEqual(comp.index(), "42\n")
         self.assertEqual(comp.nothing(), "\n")
         self.assertEqual(comp.default(), "<span>42</span>\n")

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_simpleviewclass.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_simpleviewclass.py	2004-09-30 20:18:25 UTC (rev 27720)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/pagetemplate/tests/test_simpleviewclass.py	2004-09-30 20:50:50 UTC (rev 27721)
@@ -23,9 +23,11 @@
 
     def test_simple(self):
         from zope.app.pagetemplate.tests.simpletestview import SimpleTestView
+        from zope.publisher.browser import TestRequest
 
         ob = data()
-        view = SimpleTestView(ob, None)
+        request = TestRequest()
+        view = SimpleTestView(ob, request)
         macro = view['test']
         out = view()
         self.assertEqual(out,
@@ -36,6 +38,7 @@
 
     def test_WBases(self):
         from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
+        from zope.publisher.browser import TestRequest
 
         class C(object): pass
 
@@ -44,7 +47,8 @@
         self.failUnless(issubclass(SimpleTestView, C))
 
         ob = data()
-        view = SimpleTestView(ob, None)
+        request = TestRequest()
+        view = SimpleTestView(ob, request)
         macro = view['test']
         out = view()
         self.assertEqual(out,



More information about the Zope3-Checkins mailing list