[CMF-checkins]
SVN: CMF/branches/tseaver-viewification/CMFDefault/tests/test_DiscussionReply.py
Fix test breakage due to multiple registrations of five:traversable.
Tres Seaver
tseaver at palladion.com
Fri Dec 2 14:07:58 EST 2005
Log message for revision 40501:
Fix test breakage due to multiple registrations of five:traversable.
Changed:
U CMF/branches/tseaver-viewification/CMFDefault/tests/test_DiscussionReply.py
-=-
Modified: CMF/branches/tseaver-viewification/CMFDefault/tests/test_DiscussionReply.py
===================================================================
--- CMF/branches/tseaver-viewification/CMFDefault/tests/test_DiscussionReply.py 2005-12-02 18:58:00 UTC (rev 40500)
+++ CMF/branches/tseaver-viewification/CMFDefault/tests/test_DiscussionReply.py 2005-12-02 19:07:57 UTC (rev 40501)
@@ -21,13 +21,26 @@
import Products
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
+from Products.Five.fiveconfigure import cleanUp
from Products.Five import zcml
from Products.CMFCore.tests.base.testcase import _TRAVERSE_ZCML
from Products.CMFCore.tests.base.testcase import PlacelessSetup
from Products.CMFCore.tests.base.testcase import RequestTest
+_DOCUMENT_TRAVERSE_ZCML = """\
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:five="http://namespaces.zope.org/five"
+ >
+ <five:traversable
+ class="Products.CMFDefault.Document.Document"
+ />
+
+</configure>
+"""
+
class DiscussionReplyTest(PlacelessSetup, RequestTest):
def setUp(self):
@@ -39,8 +52,10 @@
zcml.load_config('configure.zcml', Products.CMFCore)
zcml.load_config('configure.zcml', Products.DCWorkflow)
zcml.load_string(_TRAVERSE_ZCML)
+ zcml.load_string(_DOCUMENT_TRAVERSE_ZCML)
try:
- factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
+ factory = self.root.manage_addProduct[
+ 'CMFDefault'].addConfiguredSite
factory('cmf', 'CMFDefault:default', snapshot=False)
self.portal = self.root.cmf
# Become a Manager
@@ -60,6 +75,7 @@
def tearDown(self):
noSecurityManager()
+ cleanUp()
RequestTest.tearDown(self)
PlacelessSetup.tearDown(self)
More information about the CMF-checkins
mailing list