SVN: CMF/branches/1.5/CMFCore/tests/test_PortalContent.py Suppress uninformative DeprecationWarning (we are explicitly testing BBB).

Tres Seaver <[email protected]>
Newsgroups gmane.comp.web.zope.cmf.cvs
Message-ID <[email protected]>
Log message for revision 69959:
  Suppress uninformative DeprecationWarning (we are explicitly testing BBB).

Changed:
  U   CMF/branches/1.5/CMFCore/tests/test_PortalContent.py

-=-
Modified: CMF/branches/1.5/CMFCore/tests/test_PortalContent.py
===================================================================
--- CMF/branches/1.5/CMFCore/tests/test_PortalContent.py	2006-09-04 18:04:23 UTC (rev 69958)
+++ CMF/branches/1.5/CMFCore/tests/test_PortalContent.py	2006-09-04 18:29:47 UTC (rev 69959)
@@ -36,13 +36,20 @@
 from Products.CMFCore.tests.base.dummy import DummySite
 from Products.CMFCore.tests.base.dummy import DummyUserFolder
 from Products.CMFCore.tests.base.testcase import SecurityRequestTest
+from Products.CMFCore.tests.base.testcase import WarningInterceptor
 from Products.CMFCore.tests.base.dummy import DummyTool
 from Products.CMFCore.tests.base.dummy import DummyContent
 from Products.CMFCore.tests.base.dummy import DummyObject
 from OFS.Folder import Folder
 
-class PortalContentTests(TestCase):
+class PortalContentTests(TestCase, WarningInterceptor):
 
+    def setUp(self):
+        self._free_warning_output()
+
+    def tearDown(self):
+        self._free_warning_output()
+
     def test_z2interfaces(self):
         from Interface.Verify import verifyClass
         from Products.CMFCore.interfaces.Contentish \
@@ -96,6 +103,7 @@
                        )
         ob = self._setupCallTests(test_aliases)
         # blank default is BBB
+        self._trap_warning_output()
         self.assertEqual( ob(), 'dummy' )
 
     def test_SpecificAlias(self):
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.