[Zope3-checkins] CVS: Zope3/src/zope/app/browser/tests -
test_absoluteurl.py:1.15.2.1
Jim Fulton
jim at zope.com
Mon Sep 8 15:22:02 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv20092/src/zope/app/browser/tests
Modified Files:
Tag: parentgeddon-branch
test_absoluteurl.py
Log Message:
Checking in work in progress on parentgeddon-branch so Fred can help
me to get the tests passing. Specific log entries will be provided
when we merge this into the head.
=== Zope3/src/zope/app/browser/tests/test_absoluteurl.py 1.15 => 1.15.2.1 ===
--- Zope3/src/zope/app/browser/tests/test_absoluteurl.py:1.15 Thu Sep 4 10:22:20 2003
+++ Zope3/src/zope/app/browser/tests/test_absoluteurl.py Mon Sep 8 14:21:31 2003
@@ -30,7 +30,7 @@
from zope.publisher.http import IHTTPRequest
from zope.publisher.http import HTTPCharsets
from zope.publisher.interfaces.browser import IBrowserPresentation
-from zope.app.context import ContextWrapper
+from zope.app.container.contained import contained
class IRoot(Interface): pass
@@ -71,9 +71,9 @@
request = TestRequest()
request.setViewType(IBrowserPresentation)
- content = ContextWrapper(TrivialContent(), Root(), name='a')
- content = ContextWrapper(TrivialContent(), content, name='b')
- content = ContextWrapper(TrivialContent(), content, name='c')
+ content = contained(TrivialContent(), Root(), name='a')
+ content = contained(TrivialContent(), content, name='b')
+ content = contained(TrivialContent(), content, name='c')
view = getView(content, 'absolute_url', request)
self.assertEqual(str(view), 'http://foobar.com/a/b/c')
@@ -90,10 +90,10 @@
request.setViewType(IBrowserPresentation)
vh_root = TrivialContent()
- content = ContextWrapper(vh_root, Root(), name='a')
- request._vh_root = ContextWrapper(vh_root, Root(), name='a')
- content = ContextWrapper(TrivialContent(), content, name='b')
- content = ContextWrapper(TrivialContent(), content, name='c')
+ content = contained(vh_root, Root(), name='a')
+ request._vh_root = contained(vh_root, Root(), name='a')
+ content = contained(TrivialContent(), content, name='b')
+ content = contained(TrivialContent(), content, name='c')
view = getView(content, 'absolute_url', request)
self.assertEqual(str(view), 'http://foobar.com/b/c')
@@ -109,11 +109,10 @@
request.setViewType(IBrowserPresentation)
vh_root = TrivialContent()
- request._vh_root = ContextWrapper(vh_root, Root(), name='a')
-
- content = ContextWrapper(vh_root, Root(), name='a')
- content = ContextWrapper(TrivialContent(), content, name='b')
- content = ContextWrapper(TrivialContent(), content, name='c')
+ request._vh_root = contained(vh_root, Root(), name='a')
+ content = contained(vh_root, Root(), name='a')
+ content = contained(TrivialContent(), content, name='b')
+ content = contained(TrivialContent(), content, name='c')
view = getView(content, 'absolute_url', request)
self.assertEqual(str(view), 'http://foobar.com/b/c')
@@ -129,11 +128,11 @@
request.setViewType(IBrowserPresentation)
root = Root()
- request._vh_root = ContextWrapper(root, root, name='')
- content = ContextWrapper(root, None)
- content = ContextWrapper(TrivialContent(), content, name='a')
- content = ContextWrapper(TrivialContent(), content, name='b')
- content = ContextWrapper(TrivialContent(), content, name='c')
+ request._vh_root = contained(root, root, name='')
+ content = contained(root, None)
+ content = contained(TrivialContent(), content, name='a')
+ content = contained(TrivialContent(), content, name='b')
+ content = contained(TrivialContent(), content, name='c')
view = getView(content, 'absolute_url', request)
self.assertEqual(str(view), 'http://foobar.com/a/b/c')
More information about the Zope3-Checkins
mailing list