[Checkins] SVN: grok/branches/philikon-eggification/src/grok/ftest
Make ftests run by creating a Grok-specific ftesting.zcml
(lifted off of a branch
Philipp von Weitershausen
philikon at philikon.de
Tue Apr 17 18:00:43 EDT 2007
Log message for revision 74220:
Make ftests run by creating a Grok-specific ftesting.zcml (lifted off of a branch
that I had made earlier) and turning that into a test layer.
Changed:
A grok/branches/philikon-eggification/src/grok/ftesting.zcml
U grok/branches/philikon-eggification/src/grok/ftests/test_grok_functional.py
-=-
Copied: grok/branches/philikon-eggification/src/grok/ftesting.zcml (from rev 74219, grok/branches/philikon-grokking-tests/src/grok/ftesting.zcml)
===================================================================
--- grok/branches/philikon-grokking-tests/src/grok/ftesting.zcml 2007-04-17 21:45:57 UTC (rev 74219)
+++ grok/branches/philikon-eggification/src/grok/ftesting.zcml 2007-04-17 22:00:42 UTC (rev 74220)
@@ -0,0 +1,52 @@
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ i18n_domain="grok"
+ package="grok"
+ >
+
+ <include package="zope.i18n" file="meta.zcml" />
+ <include package="zope.security" file="meta.zcml" />
+ <include package="zope.app.zcmlfiles" file="meta.zcml" />
+ <include package="zope.app.securitypolicy" file="meta.zcml" />
+ <include package="grok" file="meta.zcml" />
+
+ <include package="zope.annotation" />
+ <include package="zope.copypastemove" />
+ <include package="zope.formlib" />
+ <include package="zope.i18n.locales" />
+ <include package="zope.publisher" />
+ <include package="zope.traversing" />
+ <include package="zope.traversing.browser" />
+ <include package="zope.app.zcmlfiles" />
+ <include package="zope.app.authentication" />
+ <include package="zope.app.catalog" />
+ <include package="zope.app.intid" />
+ <include package="zope.app.keyreference" />
+ <include package="grok" />
+
+ <include package="zope.app.securitypolicy" />
+ <securityPolicy
+ component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy"
+ />
+
+ <unauthenticatedPrincipal
+ id="zope.anybody"
+ title="Unauthenticated User"
+ />
+ <grant
+ permission="zope.View"
+ principal="zope.anybody"
+ />
+
+ <principal
+ id="zope.mgr"
+ title="Manager"
+ login="mgr"
+ password="mgrpw"
+ />
+
+ <role id="zope.Manager" title="Site Manager" />
+ <grantAll role="zope.Manager" />
+ <grant role="zope.Manager" principal="zope.mgr" />
+
+</configure>
Modified: grok/branches/philikon-eggification/src/grok/ftests/test_grok_functional.py
===================================================================
--- grok/branches/philikon-eggification/src/grok/ftests/test_grok_functional.py 2007-04-17 21:45:57 UTC (rev 74219)
+++ grok/branches/philikon-eggification/src/grok/ftests/test_grok_functional.py 2007-04-17 22:00:42 UTC (rev 74220)
@@ -1,9 +1,15 @@
import unittest
+import grok
+import os.path
+
from pkg_resources import resource_listdir
from zope.testing import doctest
from zope.app.testing.functional import (HTTPCaller, getRootFolder,
- FunctionalTestSetup, sync, Functional)
+ FunctionalTestSetup, sync, ZCMLLayer)
+ftesting_zcml = os.path.join(os.path.dirname(grok.__file__), 'ftesting.zcml')
+GrokFunctionalLayer = ZCMLLayer(ftesting_zcml, 'grok', 'GrokFunctionalLayer')
+
# XXX bastardized from zope.app.testing.functional.FunctionalDocFileSuite :-(
def FunctionalDocTestSuite(*paths, **kw):
globs = kw.setdefault('globs', {})
@@ -37,7 +43,7 @@
| doctest.NORMALIZE_WHITESPACE)
suite = doctest.DocTestSuite(*paths, **kw)
- suite.layer = Functional
+ suite.layer = GrokFunctionalLayer
return suite
def suiteFromPackage(name):
More information about the Checkins
mailing list