[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/zptpage/tests/test_zptpageeval.py Forgot to fix a test.

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 1 21:09:56 EST 2005


Log message for revision 29377:
  Forgot to fix a test.
  
  

Changed:
  U   Zope3/trunk/src/zope/app/zptpage/tests/test_zptpageeval.py

-=-
Modified: Zope3/trunk/src/zope/app/zptpage/tests/test_zptpageeval.py
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/tests/test_zptpageeval.py	2005-03-02 02:07:05 UTC (rev 29376)
+++ Zope3/trunk/src/zope/app/zptpage/tests/test_zptpageeval.py	2005-03-02 02:09:55 UTC (rev 29377)
@@ -35,15 +35,22 @@
             name='zope'
         folder = Folder()
 
-        class Request(object):
-            def _getResponse(self):
-                return self
+        class Response(object):
 
-            response = property(_getResponse)
+            base = None
 
+            def setBase(self, base):
+                self.base = base
+
             def setHeader(self, name, value):
                 setattr(self, name, value)
 
+        class Request(object):
+
+            response = Response()
+
+            URL = ['http://localhost', 'http://localhost/pt']
+
         request = Request()
         template = contained(Template(), folder)
 
@@ -53,7 +60,8 @@
         view.request = request
         self.assertEqual(view.index(), 42)
         self.assertEqual(template.called, (request, {}))
-        self.assertEqual(getattr(request, 'content-type'), 'text/x-test')
+        self.assertEqual(getattr(request.response, 'content-type'),
+                         'text/x-test')
 
 def test_suite():
     return makeSuite(Test)



More information about the Zope3-Checkins mailing list