[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL/tests - testAbsoluteURL.py:1.1.2.5.4.2
Jim Fulton
jim@zope.com
Sun, 2 Jun 2002 10:35:26 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication/AbsoluteURL/tests
In directory cvs.zope.org:/tmp/cvs-serv29793/lib/python/Zope/App/ZopePublication/AbsoluteURL/tests
Modified Files:
Tag: Zope3InWonderland-branch
testAbsoluteURL.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/ZopePublication/AbsoluteURL/tests/testAbsoluteURL.py 1.1.2.5.4.1 => 1.1.2.5.4.2 ===
from Zope.ComponentArchitecture import getService, getView
-from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
+from Zope.Publisher.Browser.IBrowserPresentation import IBrowserPresentation
from Zope.Publisher.HTTP.tests.TestRequest import TestRequest
from Zope.Proxy.ContextWrapper import ContextWrapper
from Interface import Interface
@@ -38,24 +38,26 @@
from Zope.App.ZopePublication.AbsoluteURL.AbsoluteURL \
import AbsoluteURL, SiteAbsoluteURL
provideView=getService(None,"Views").provideView
- provideView(None, 'absolute_url', IBrowserPublisher, [AbsoluteURL])
- provideView(IRoot, 'absolute_url', IBrowserPublisher, [SiteAbsoluteURL])
+ provideView(None, 'absolute_url', IBrowserPresentation,
+ [AbsoluteURL])
+ provideView(IRoot, 'absolute_url', IBrowserPresentation,
+ [SiteAbsoluteURL])
def testBadObject(self):
request = TestRequest()
- request.setViewType(IBrowserPublisher)
+ request.setViewType(IBrowserPresentation)
view = getView(None, 'absolute_url', request)
self.assertRaises(TypeError, view.__str__)
def testNoContext(self):
request = TestRequest()
- request.setViewType(IBrowserPublisher)
+ request.setViewType(IBrowserPresentation)
view = getView(Root(), 'absolute_url', request)
self.assertEqual(str(view), 'http://foobar.com')
def testBasicContext(self):
request = TestRequest()
- request.setViewType(IBrowserPublisher)
+ request.setViewType(IBrowserPresentation)
content = ContextWrapper(object(), Root(), name='a')
content = ContextWrapper(object(), content, name='b')