[Checkins] SVN: grokcore.message/trunk/ re-introduce the ftesting.zcml file again for registering two missing utilities that apparently __are__ registered when running an application

Jan-Wijbrand Kolman janwijbrand at gmail.com
Mon Oct 25 12:01:04 EDT 2010


Log message for revision 117866:
  re-introduce the ftesting.zcml file again for registering two missing utilities that apparently __are__ registered when running an application

Changed:
  U   grokcore.message/trunk/CHANGES.txt
  U   grokcore.message/trunk/buildout.cfg
  U   grokcore.message/trunk/setup.py
  U   grokcore.message/trunk/src/grokcore/message/configure.zcml
  A   grokcore.message/trunk/src/grokcore/message/ftesting.zcml
  U   grokcore.message/trunk/src/grokcore/message/tests.py

-=-
Modified: grokcore.message/trunk/CHANGES.txt
===================================================================
--- grokcore.message/trunk/CHANGES.txt	2010-10-25 15:34:03 UTC (rev 117865)
+++ grokcore.message/trunk/CHANGES.txt	2010-10-25 16:01:03 UTC (rev 117866)
@@ -4,9 +4,9 @@
 0.4.2 (unreleased)
 ==================
 
-- Nothing changed yet.
+- Tests fixed by explicitely registering the IClientIdManager and
+  ISessionDataContainer utilities. The ftesting.zcml was re-introduced for this.
 
-
 0.4.1 (2010-10-25)
 ==================
 

Modified: grokcore.message/trunk/buildout.cfg
===================================================================
--- grokcore.message/trunk/buildout.cfg	2010-10-25 15:34:03 UTC (rev 117865)
+++ grokcore.message/trunk/buildout.cfg	2010-10-25 16:01:03 UTC (rev 117866)
@@ -4,6 +4,8 @@
 extends = http://svn.zope.org/*checkout*/groktoolkit/trunk/grok.cfg
 versions = versions
 
+[versions]
+grokcore.message =
 
 [interpreter]
 recipe = zc.recipe.egg

Modified: grokcore.message/trunk/setup.py
===================================================================
--- grokcore.message/trunk/setup.py	2010-10-25 15:34:03 UTC (rev 117865)
+++ grokcore.message/trunk/setup.py	2010-10-25 16:01:03 UTC (rev 117866)
@@ -13,6 +13,7 @@
     'z3c.flashmessage',
     'grokcore.component',
     'zope.component',
+    'zope.traversing', # zope.session seems not to declare this dep.
     ]
 
 tests_require = [

Modified: grokcore.message/trunk/src/grokcore/message/configure.zcml
===================================================================
--- grokcore.message/trunk/src/grokcore/message/configure.zcml	2010-10-25 15:34:03 UTC (rev 117865)
+++ grokcore.message/trunk/src/grokcore/message/configure.zcml	2010-10-25 16:01:03 UTC (rev 117866)
@@ -1,7 +1,29 @@
 <configure
   xmlns="http://namespaces.zope.org/zope"
-  xmlns:grok="http://namespaces.zope.org/grok">
+  xmlns:grok="http://namespaces.zope.org/grok"
+  >
+  <include package="zope.component" file="meta.zcml"/>
+  <include package="zope.security" file="meta.zcml"/>
+  <include package="grokcore.component" file="meta.zcml" />
+
+  <include package="zope.component" />
+  <include package="zope.security" />
   <include package="zope.session" />
-  <include package="grokcore.component" file="meta.zcml" />
+
+  <!--
+  These registration seem to be made somewhere in the stack when running the
+  application. For the tests we need to register them explicitely
+  -->
+
+  <utility
+    factory="zope.session.http.CookieClientIdManager"
+    provides="zope.session.interfaces.IClientIdManager"
+  />
+
+  <utility
+    factory="zope.session.session.RAMSessionDataContainer"
+    provides="zope.session.interfaces.ISessionDataContainer"
+  />
+
   <grok:grok package="." />
 </configure>

Added: grokcore.message/trunk/src/grokcore/message/ftesting.zcml
===================================================================
--- grokcore.message/trunk/src/grokcore/message/ftesting.zcml	                        (rev 0)
+++ grokcore.message/trunk/src/grokcore/message/ftesting.zcml	2010-10-25 16:01:03 UTC (rev 117866)
@@ -0,0 +1,9 @@
+<configure
+  xmlns="http://namespaces.zope.org/zope"
+  xmlns:grok="http://namespaces.zope.org/grok"
+  >
+
+
+  <include package="grokcore.message"/>
+
+</configure>
\ No newline at end of file

Modified: grokcore.message/trunk/src/grokcore/message/tests.py
===================================================================
--- grokcore.message/trunk/src/grokcore/message/tests.py	2010-10-25 15:34:03 UTC (rev 117865)
+++ grokcore.message/trunk/src/grokcore/message/tests.py	2010-10-25 16:01:03 UTC (rev 117866)
@@ -23,7 +23,6 @@
     suite = unittest.TestSuite()
     test = doctest.DocFileSuite(
         'README.txt', optionflags=doctest.ELLIPSIS)
-    test.layer = GrokcoreMessageLayer(
-        grokcore.message, zcml_file='configure.zcml')
+    test.layer = GrokcoreMessageLayer(grokcore.message)
     suite.addTest(test)
     return suite



More information about the checkins mailing list