diff options
Diffstat (limited to 'src/zope/traversing')
-rw-r--r-- | src/zope/traversing/tests/ftesting.zcml | 37 | ||||
-rw-r--r-- | src/zope/traversing/tests/test_vhosting.py | 8 |
2 files changed, 35 insertions, 10 deletions
diff --git a/src/zope/traversing/tests/ftesting.zcml b/src/zope/traversing/tests/ftesting.zcml index 07bba57..41b2713 100644 --- a/src/zope/traversing/tests/ftesting.zcml +++ b/src/zope/traversing/tests/ftesting.zcml @@ -5,10 +5,34 @@ package="zope.traversing" > - <!-- This file is the equivalent of site.zcml and it is --> - <!-- used for functional testing setup --> + <include package="zope.browserpage" file="meta.zcml" /> + <include package="zope.component" file="meta.zcml" /> + <include package="zope.publisher" file="meta.zcml" /> + <include package="zope.security" file="meta.zcml" /> + <include package="zope.app.publication" file="meta.zcml" /> + <include package="zope.app.securitypolicy" file="meta.zcml" /> + + <include package="zope.browserresource" /> + <include package="zope.container" /> + <include package="zope.location" /> + <include package="zope.principalregistry" /> + <include package="zope.publisher" /> + <include package="zope.security" /> + <include package="zope.site" /> + <include package="zope.traversing" /> + + <include package="zope.app.appsetup" /> + <include package="zope.app.publication" /> - <include package="zope.app.zcmlfiles" /> + <browser:defaultView name="index.html" /> + <include package="zope.traversing.browser" /> + + <browser:page + for="zope.site.interfaces.IFolder" + permission="zope.View" + class="zope.traversing.tests.test_vhosting.MyFolderPage" + name="index.html" attribute="index" + /> <browser:page name="index.html" @@ -30,13 +54,6 @@ <!-- Principals --> - <unauthenticatedPrincipal - id="zope.anybody" - title="Unauthenticated User" /> - - - <include package="zope.app.securitypolicy" file="meta.zcml" /> - <securityPolicy component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" /> diff --git a/src/zope/traversing/tests/test_vhosting.py b/src/zope/traversing/tests/test_vhosting.py index 59fa426..e2897a2 100644 --- a/src/zope/traversing/tests/test_vhosting.py +++ b/src/zope/traversing/tests/test_vhosting.py @@ -62,6 +62,14 @@ class MyPageEval(object): return template.render(template.__parent__, request, **kw) +class MyFolderPage(object): + + def index(self, **kw): + """My folder page""" + self.request.response.redirect('index.html') + return '' + + class TestVirtualHosting(functional.BrowserTestCase): layer = TraversingLayer |