[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/HTTP/tests - testHTTP.py:1.1.2.5
Andreas Jung
andreas@digicool.com
Thu, 10 Jan 2002 11:24:48 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/HTTP/tests
In directory cvs.zope.org:/tmp/cvs-serv4900
Modified Files:
Tag: Zope-3x-branch
testHTTP.py
Log Message:
added test for IViewRequest
=== Zope3/lib/python/Zope/Publisher/HTTP/tests/testHTTP.py 1.1.2.4 => 1.1.2.5 ===
from Zope.Publisher.Publish import publish
from Zope.Publisher.DefaultPublication import DefaultPublication
+from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
from Interface import verify, instancesOfObjectImplements
@@ -141,6 +142,20 @@
req = self._createRequest(env)
lpw = req._authUserPW()
self.assertEquals(lpw, (login, password))
+
+
+
+ def testIViewRequest(self):
+ ''' test the IView request'''
+
+ r = self._createRequest()
+
+ self.failUnless( r.getViewType() is IBrowserPublisher)
+ self.assertEqual( r.getViewSkin(), '')
+ r.setViewSkin( 'morefoo' )
+ self.assertEqual( r.getViewSkin(), 'morefoo')
+
+
def test_suite():
loader = unittest.TestLoader()