[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content/tests - test_zptpageeval.py:1.3
Jim Fulton
jim@zope.com
Sat, 25 Jan 2003 08:34:19 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/content/tests
In directory cvs.zope.org:/tmp/cvs-serv27753/tests
Modified Files:
test_zptpageeval.py
Log Message:
Changed the index method to no longer get a REQUEST passed to it.
Instead, just use the views request attr.
=== Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py:1.2 Wed Dec 25 09:12:31 2002
+++ Zope3/src/zope/app/browser/content/tests/test_zptpageeval.py Sat Jan 25 08:34:17 2003
@@ -22,6 +22,7 @@
from zope.app.browser.content.zpt import ZPTPageEval
from zope.proxy.context import ContextWrapper
+from zope.publisher.browser import TestRequest
class Test(CleanUp, TestCase):
@@ -51,8 +52,8 @@
template = ContextWrapper(Template(), folder)
- view = ZPTPageEval(template, None)
- self.assertEqual(view.index(request), 42)
+ view = ZPTPageEval(template, request)
+ self.assertEqual(view.index(), 42)
self.assertEqual(template.called, (request, {}))
self.assertEqual(getattr(request, 'content-type'), 'text/x-test')