[Checkins] SVN: zope.component/tseaver-test_cleanup/ Fix tests after StringIO reorg.
Tres Seaver
cvs-admin at zope.org
Sun Jun 17 17:39:20 UTC 2012
Log message for revision 126887:
Fix tests after StringIO reorg.
Changed:
_U zope.component/tseaver-test_cleanup/
U zope.component/tseaver-test_cleanup/src/zope/component/tests/test_doctests.py
-=-
Modified: zope.component/tseaver-test_cleanup/src/zope/component/tests/test_doctests.py
===================================================================
--- zope.component/tseaver-test_cleanup/src/zope/component/tests/test_doctests.py 2012-06-17 17:39:11 UTC (rev 126886)
+++ zope.component/tseaver-test_cleanup/src/zope/component/tests/test_doctests.py 2012-06-17 17:39:16 UTC (rev 126887)
@@ -1335,9 +1335,9 @@
XMLConfig('meta.zcml', zope.component)()
XMLConfig('meta.zcml', zope.security)()
- def _config(self, zcml):
+ def _config(self, zcml, testing=0):
from cStringIO import StringIO
- xmlconfig(StringIO(template % zcml))
+ xmlconfig(StringIO(template % zcml), testing=testing)
def testView(self):
ob = Ob3()
@@ -1500,7 +1500,7 @@
type="zope.component.testfiles.views.IR"
factory="zope.component.testfiles.adapter.A1"
/>
- '''))
+ ''')
content = Content()
a1 = zope.component.getMultiAdapter((content, Request(IR)))
@@ -1583,8 +1583,7 @@
def testIncompleteProtectedViewNoPermission(self):
self.assertRaises(
ConfigurationError,
- self._config(
- StringIO(template %
+ self._config,
'''
<view name="test"
factory="zope.component.testfiles.views.V1"
@@ -1592,7 +1591,8 @@
type="zope.component.testfiles.views.IV"
allowed_attributes="action index"
/>
- ''')
+ ''',
+ )
def testViewUndefinedPermission(self):
self.assertRaises(ValueError,
More information about the checkins
mailing list