[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/apidoc/utilitymodule/ftests.py Avoid generation of deprecation messages during testing

Roger Ineichen roger at projekt01.ch
Sat Apr 22 21:33:37 EDT 2006


Log message for revision 67281:
  Avoid generation of deprecation messages during testing
  This tests is traversing the deprecated ILayer interface.

Changed:
  U   Zope3/trunk/src/zope/app/apidoc/utilitymodule/ftests.py

-=-
Modified: Zope3/trunk/src/zope/app/apidoc/utilitymodule/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/utilitymodule/ftests.py	2006-04-23 01:29:05 UTC (rev 67280)
+++ Zope3/trunk/src/zope/app/apidoc/utilitymodule/ftests.py	2006-04-23 01:33:36 UTC (rev 67281)
@@ -15,6 +15,7 @@
 
 $Id$
 """
+import zope.deprecation
 import unittest
 from zope.app.testing.functional import BrowserTestCase
 
@@ -28,8 +29,15 @@
         self.assertEqual(response.getStatus(), 200)
         body = response.getBody()
         self.assert_(body.find('IDocumentationModule') > 0)
+
+        # BBB 2006/02/18, to be removed after 12 months
+        # this avoids the deprecation warning for the deprecated
+        # zope.publisher.interfaces.ILayer interface which get traversed
+        # as a utility in this test
+        zope.deprecation.__show__.off()
         self.checkForBrokenLinks(body, '/++apidoc++/Utility/menu.html',
                                  basic='mgr:mgrpw')
+        zope.deprecation.__show__.on()
 
     def testUtilityDetailsView(self):
         response = self.publish(



More information about the Zope3-Checkins mailing list