[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/tests - testContainerTraverser.py:1.1.2.5.8.2
Jim Fulton
jim@zope.com
Sun, 2 Jun 2002 10:35:16 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/tests
In directory cvs.zope.org:/tmp/cvs-serv29793/lib/python/Zope/App/OFS/Container/tests
Modified Files:
Tag: Zope3InWonderland-branch
testContainerTraverser.py
Log Message:
- Added template attribute to allow views to be created from a
template source file.
- Added beginnings of a Zope debugger. This required seperating site
and server configuration.
- Added the ability to specify a config file package in the
zopeConfigure directive. Made "config.zcml" a default for the file
attribute in the include directive.
- Fixed mapply to unwrap proxied objects. This was necessary once
views became wrapped in proxies. We need to investigate why they
weren't being wrapped before.
- I updated enough system page templates and zcml directives so that:
- Zope now starts. :)
- The root folder contents listing can be viewed.
Many more templates and zcml files need to be updated to reflect the
way views are now handled.
=== Zope3/lib/python/Zope/App/OFS/Container/tests/testContainerTraverser.py 1.1.2.5.8.1 => 1.1.2.5.8.2 ===
req = Request( I, '')
- T = ContainerTraverser(c)
+ T = ContainerTraverser(c, req)
self.failUnless(T.publishTraverse(req,'foo') is foo)
self.assertRaises(NotFoundError , T.publishTraverse, req ,'morebar')
@@ -74,21 +74,21 @@
def testView(self):
""" test getting a view """
-
+
foo = Container()
c = Container( foo=foo )
req = Request( I, '')
- T = ContainerTraverser(c)
- getService(None,'Views').provideView(IContainer, 'foo', I, [View])
+ T = ContainerTraverser(c, req)
+ getService(None,'Views').provideView(IContainer, 'viewfoo', I, [View])
- self.failUnless(T.publishTraverse(req,'foo;view').__class__ is View )
+ self.failUnless(T.publishTraverse(req,'viewfoo').__class__ is View )
self.failUnless(T.publishTraverse(req,'foo') is foo)
self.assertRaises(NotFoundError , T.publishTraverse, req, 'morebar')
self.assertRaises(NotFoundError , T.publishTraverse, req,
- 'morebar;view')
+ 'view::morebar')