[CMF-checkins] CVS: Products/CMFCalendar/tests - test_Calendar.py:1.12.2.6

Tres Seaver tseaver at palladion.com
Fri Jul 15 22:31:02 EDT 2005


Update of /cvs-repository/Products/CMFCalendar/tests
In directory cvs.zope.org:/tmp/cvs-serv15086/CMFCalendar/tests

Modified Files:
      Tag: CMF-1_5-branch
	test_Calendar.py 
Log Message:


 - Added testing framework to suppress / examine output from warnings
   module and from zLOG (cleaner than just 'filterwarnings', which was
   leaving nasty side effects).


=== Products/CMFCalendar/tests/test_Calendar.py 1.12.2.5 => 1.12.2.6 ===
--- Products/CMFCalendar/tests/test_Calendar.py:1.12.2.5	Tue Apr  5 05:25:19 2005
+++ Products/CMFCalendar/tests/test_Calendar.py	Fri Jul 15 22:30:31 2005
@@ -33,6 +33,7 @@
 from Products.ExternalMethod.ExternalMethod import manage_addExternalMethod
 from Products.TemporaryFolder.TemporaryFolder import MountedTemporaryFolder
 from Products.Transience.Transience import TransientObjectContainer
+from Products.CMFCore.tests.base.testcase import WarningInterceptor
 from Testing.makerequest import makerequest
 try:
     import transaction
@@ -81,9 +82,10 @@
             locale.setlocale(locale.LC_ALL, old_locale)
 
 
-class CalendarRequestTests(unittest.TestCase):
+class CalendarRequestTests(unittest.TestCase, WarningInterceptor):
 
     def setUp(self):
+        self._trap_warning_output()
         transaction.begin()
 
         app = self.app = makerequest(Zope2.app())
@@ -121,6 +123,7 @@
         noSecurityManager()
         transaction.abort()
         self.app._p_jar.close()
+        self._free_warning_output()
 
     def _testURL(self,url,params=None):
         Site = self.Site



More information about the CMF-checkins mailing list