[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZMI/tests - testZMIViewUtility.py:1.1.2.6.2.1
Stephan Richter
srichter@cbu.edu
Wed, 13 Mar 2002 05:58:00 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZMI/tests
In directory cvs.zope.org:/tmp/cvs-serv11175/lib/python/Zope/App/ZMI/tests
Modified Files:
Tag: srichter-OFS_Formulator-branch
testZMIViewUtility.py
Log Message:
- Added some more tests. Won;t do more, since Publisher is being redesigned
later this week. I will wait until then.
- Added preliminary SOAP support, so we can test Mozilla's SOAP
capabilities. Unfortunately, soaplib is very old; I will look into using
SOAPpy instead. It seems fairly complete.
=== Zope3/lib/python/Zope/App/ZMI/tests/testZMIViewUtility.py 1.1.2.6 => 1.1.2.6.2.1 ===
from Zope.App.ZMI.ZMIViewUtility import ZMIViewUtility
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
-from Zope.App.ZopePublication.Traversers import DefaultTraverser
+from Zope.App.ZopePublication.Browser.BrowserTraversers import \
+ DefaultTraverser
from Zope.App.Security.SecurityManagement import setSecurityPolicy
from Zope.Exceptions import Unauthorized
@@ -47,9 +48,15 @@
('lbad', 'abad'),
('l3', 'a3;view'),]
-class I(Interface): pass
+
+class I(Interface):
+ pass
+
+
class C:
__implements__ = I
+
+
ob = C()
ob.a1 = C()
ob.a2 = C()
@@ -57,11 +64,21 @@
ob.abad = C()
ob.abad.bad=1
+
class V:
def __init__(self, context): pass
__implements__ = IBrowserPublisher
+class Request:
+
+ def getViewType(self):
+ return IBrowserPublisher
+
+ def getViewSkin(self):
+ return ''
+
+
class Test(CleanUp, unittest.TestCase):
def setUp(self):
@@ -84,11 +101,7 @@
{'label':'l3', 'action':'../a3;view'}
])
-class Request:
- def getViewType(self):
- return IBrowserPublisher
- def getViewSkin(self):
- return ''
+
def test_suite():
loader=unittest.TestLoader()