[Zope3-checkins] CVS: Zope3/src/zope/app/traversing/browser/tests -
test_absoluteurl.py:1.3
Stephan Richter
srichter at cosmos.phy.tufts.edu
Thu Mar 18 15:33:56 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/traversing/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv30105/src/zope/app/traversing/browser/tests
Modified Files:
test_absoluteurl.py
Log Message:
Added a test to make sure that additional, non-object path elements are
retained by "absolute_url".
=== Zope3/src/zope/app/traversing/browser/tests/test_absoluteurl.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/traversing/browser/tests/test_absoluteurl.py:1.2 Mon Mar 15 15:42:10 2004
+++ Zope3/src/zope/app/traversing/browser/tests/test_absoluteurl.py Thu Mar 18 15:33:56 2004
@@ -76,6 +76,27 @@
{'name': 'c', 'url': 'http://127.0.0.1/a/b/c'},
))
+ def testRetainSkin(self):
+ request = TestRequest()
+ request._traversed_names = ('a', 'b')
+ request._app_names = ('++skin++test', )
+
+ content = contained(TrivialContent(), Root(), name='a')
+ content = contained(TrivialContent(), content, name='b')
+ content = contained(TrivialContent(), content, name='c')
+ view = getView(content, 'absolute_url', request)
+ base = 'http://127.0.0.1/++skin++test'
+ self.assertEqual(str(view), base + '/a/b/c')
+
+ breadcrumbs = view.breadcrumbs()
+ self.assertEqual(breadcrumbs,
+ ({'name': '', 'url': base + ''},
+ {'name': 'a', 'url': base + '/a'},
+ {'name': 'b', 'url': base + '/a/b'},
+ {'name': 'c', 'url': base + '/a/b/c'},
+ ))
+
+
def testVirtualHosting(self):
request = TestRequest()
More information about the Zope3-Checkins
mailing list