[Zope3-checkins] CVS: Zope3/src/zope/publisher/tests - test_http.py:1.2.4.1
Sidnei da Silva
sidnei@x3ng.com.br
Tue, 11 Feb 2003 09:42:07 -0500
Update of /cvs-repository/Zope3/src/zope/publisher/tests
In directory cvs.zope.org:/tmp/cvs-serv18615/src/zope/publisher/tests
Modified Files:
Tag: paris-copypasterename-branch
test_http.py
Log Message:
Updating from HEAD to make sure everything still works before merging
=== Zope3/src/zope/publisher/tests/test_http.py 1.2 => 1.2.4.1 ===
--- Zope3/src/zope/publisher/tests/test_http.py:1.2 Wed Dec 25 09:15:19 2002
+++ Zope3/src/zope/publisher/tests/test_http.py Tue Feb 11 09:41:36 2003
@@ -18,6 +18,7 @@
from zope.publisher.publish import publish
from zope.publisher.base import DefaultPublication
+from zope.publisher.interfaces.http import IHTTPPresentation
from zope.interface.verify import verifyObject
from zope.interface.implements import instancesOfObjectImplements
@@ -145,11 +146,17 @@
# test the IView request
r = self._createRequest()
- self.failUnless( r.getPresentationType() is None)
- self.assertEqual( r.getPresentationSkin(), '')
+ self.assertEquals(r.getPresentationType(), IHTTPPresentation)
+ self.assertEqual(r.getPresentationSkin(), '')
r.setViewSkin( 'morefoo' )
self.assertEqual( r.getPresentationSkin(), 'morefoo')
+ def test_method(self):
+ r = self._createRequest(extra_env={'REQUEST_METHOD':'SPAM'})
+ self.assertEqual(r.method, 'SPAM')
+ r = self._createRequest(extra_env={'REQUEST_METHOD':'eggs'})
+ self.assertEqual(r.method, 'EGGS')
+
def test_suite():
loader = unittest.TestLoader()