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

Tres Seaver tseaver at palladion.com
Mon Sep 4 14:29:47 EDT 2006


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):



More information about the CMF-checkins mailing list