[Zope3-checkins] SVN: Zope3/trunk/src/zope/traversing/ftests/ Added
TraversingLayer to existing ftests.
Baiju M
baiju.m.mail at gmail.com
Sat Jan 20 00:02:39 EST 2007
Log message for revision 72112:
Added TraversingLayer to existing ftests.
Changed:
A Zope3/trunk/src/zope/traversing/ftests/ftesting.zcml
A Zope3/trunk/src/zope/traversing/ftests/layer.py
U Zope3/trunk/src/zope/traversing/ftests/test_skin.py
U Zope3/trunk/src/zope/traversing/ftests/test_vhosting.py
-=-
Added: Zope3/trunk/src/zope/traversing/ftests/ftesting.zcml
===================================================================
--- Zope3/trunk/src/zope/traversing/ftests/ftesting.zcml 2007-01-19 23:35:02 UTC (rev 72111)
+++ Zope3/trunk/src/zope/traversing/ftests/ftesting.zcml 2007-01-20 05:02:38 UTC (rev 72112)
@@ -0,0 +1,33 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="zope"
+ package="zope.traversing"
+ >
+
+ <!-- This file is the equivalent of site.zcml and it is -->
+ <!-- used for functional testing setup -->
+
+ <include package="zope.app.zcmlfiles" />
+ <include package="zope.app.zptpage"/>
+
+ <!-- Principals -->
+
+ <unauthenticatedPrincipal
+ id="zope.anybody"
+ title="Unauthenticated User" />
+
+
+ <include package="zope.app.securitypolicy" file="meta.zcml" />
+
+ <securityPolicy
+ component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+ <role id="zope.Anonymous" title="Everybody"
+ description="All users have this role implicitly" />
+
+ <!-- Replace the following directive if you don't want public access -->
+ <grant permission="zope.View"
+ role="zope.Anonymous" />
+
+
+</configure>
Property changes on: Zope3/trunk/src/zope/traversing/ftests/ftesting.zcml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: Zope3/trunk/src/zope/traversing/ftests/layer.py
===================================================================
--- Zope3/trunk/src/zope/traversing/ftests/layer.py 2007-01-19 23:35:02 UTC (rev 72111)
+++ Zope3/trunk/src/zope/traversing/ftests/layer.py 2007-01-20 05:02:38 UTC (rev 72112)
@@ -0,0 +1,8 @@
+import os
+from zope.app.testing import functional
+
+TraversingLayer = functional.ZCMLLayer(
+ os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+ __name__, 'TraversingLayer')
+
+
Property changes on: Zope3/trunk/src/zope/traversing/ftests/layer.py
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: Zope3/trunk/src/zope/traversing/ftests/test_skin.py
===================================================================
--- Zope3/trunk/src/zope/traversing/ftests/test_skin.py 2007-01-19 23:35:02 UTC (rev 72111)
+++ Zope3/trunk/src/zope/traversing/ftests/test_skin.py 2007-01-20 05:02:38 UTC (rev 72112)
@@ -18,6 +18,7 @@
import unittest
from zope.app.testing import functional
from zope.publisher.interfaces import NotFound
+from zope.traversing.ftests.layer import TraversingLayer
class TestSkin(functional.BrowserTestCase):
@@ -26,6 +27,7 @@
def test_suite():
suite = unittest.TestSuite()
+ TestSkin.layer = TraversingLayer
suite.addTest(unittest.makeSuite(TestSkin))
return suite
Modified: Zope3/trunk/src/zope/traversing/ftests/test_vhosting.py
===================================================================
--- Zope3/trunk/src/zope/traversing/ftests/test_vhosting.py 2007-01-19 23:35:02 UTC (rev 72111)
+++ Zope3/trunk/src/zope/traversing/ftests/test_vhosting.py 2007-01-20 05:02:38 UTC (rev 72112)
@@ -27,6 +27,7 @@
from zope.app.publisher.browser.resource import Resource
from zope.app.container.contained import Contained
from zope.app.zptpage.zptpage import ZPTPage
+from zope.traversing.ftests.layer import TraversingLayer
class MyObj(Contained):
def __getitem__(self, key):
@@ -182,6 +183,7 @@
def test_suite():
suite = unittest.TestSuite()
+ TestVirtualHosting.layer = TraversingLayer
suite.addTest(unittest.makeSuite(TestVirtualHosting))
return suite
More information about the Zope3-Checkins
mailing list