[Zope3-checkins] CVS: Zope3/src/zope/app/browser/tests -
test_absoluteurl.py:1.14
Jim Fulton
jim at zope.com
Fri Aug 8 15:07:43 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv5310/src/zope/app/browser/tests
Modified Files:
test_absoluteurl.py
Log Message:
In preparation for containergeddon, refactored away the use of
the side_effect_names in context wrappers to deal with path segments
with side effects.
=== Zope3/src/zope/app/browser/tests/test_absoluteurl.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/browser/tests/test_absoluteurl.py:1.13 Fri Jun 6 17:35:20 2003
+++ Zope3/src/zope/app/browser/tests/test_absoluteurl.py Fri Aug 8 14:07:09 2003
@@ -85,48 +85,6 @@
{'name': 'c', 'url': 'http://foobar.com/a/b/c'},
))
- def testContextWSideEffectsInMiddle(self):
- request = TestRequest()
- request.setViewType(IBrowserPresentation)
-
- content = ContextWrapper(TrivialContent(), Root(),
- name='a',
- side_effect_names=("++skin++ZopeTop", )
- )
- content = ContextWrapper(TrivialContent(), content, name='b')
- content = ContextWrapper(TrivialContent(), content, name='c')
- view = getView(content, 'absolute_url', request)
- self.assertEqual(str(view), 'http://foobar.com/a/++skin++ZopeTop/b/c')
-
- breadcrumbs = view.breadcrumbs()
- self.assertEqual(breadcrumbs,
- ({'name': '', 'url': 'http://foobar.com'},
- {'name': 'a', 'url': 'http://foobar.com/a/++skin++ZopeTop'},
- {'name': 'b', 'url': 'http://foobar.com/a/++skin++ZopeTop/b'},
- {'name': 'c', 'url': 'http://foobar.com/a/++skin++ZopeTop/b/c'},
- ))
-
- def testContextWSideEffectsInFront(self):
- request = TestRequest()
- request.setViewType(IBrowserPresentation)
-
- root = Root()
- content = ContextWrapper(root, None,
- side_effect_names=("++skin++ZopeTop", ))
- content = ContextWrapper(TrivialContent(), content, name='a')
- content = ContextWrapper(TrivialContent(), content, name='b')
- content = ContextWrapper(TrivialContent(), content, name='c')
- view = getView(content, 'absolute_url', request)
- self.assertEqual(str(view), 'http://foobar.com/++skin++ZopeTop/a/b/c')
-
- breadcrumbs = view.breadcrumbs()
- self.assertEqual(breadcrumbs,
- ({'name': '', 'url': 'http://foobar.com/++skin++ZopeTop'},
- {'name': 'a', 'url': 'http://foobar.com/++skin++ZopeTop/a'},
- {'name': 'b', 'url': 'http://foobar.com/++skin++ZopeTop/a/b'},
- {'name': 'c', 'url': 'http://foobar.com/++skin++ZopeTop/a/b/c'},
- ))
-
def testVirtualHosting(self):
request = TestRequest()
request.setViewType(IBrowserPresentation)
More information about the Zope3-Checkins
mailing list