[CMF-checkins] CVS: Products/CMFCore/tests - test_TypesTool.py:1.32
Yvo Schubbe
y.2004_ at wcm-solutions.de
Sun Aug 8 06:34:05 EDT 2004
Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv1109/CMFCore/tests
Modified Files:
test_TypesTool.py
Log Message:
- added tear down for warnings filter
=== Products/CMFCore/tests/test_TypesTool.py 1.31 => 1.32 ===
--- Products/CMFCore/tests/test_TypesTool.py:1.31 Sat Aug 7 07:29:56 2004
+++ Products/CMFCore/tests/test_TypesTool.py Sun Aug 8 06:34:04 2004
@@ -5,6 +5,7 @@
from Interface.Verify import verifyClass
from warnings import filterwarnings
+from warnings import filters
from AccessControl import Unauthorized
from AccessControl.SecurityManagement import newSecurityManager
@@ -45,18 +46,23 @@
def setUp( self ):
SecurityTest.setUp(self)
+
+ filterwarnings('ignore', category=DeprecationWarning)
self.site = DummySite('site').__of__(self.root)
self.acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
self.ttool = self.site._setObject( 'portal_types', TypesTool() )
fti = FTIDATA_DUMMY[0].copy()
self.ttool._setObject( 'Dummy Content', FTI(**fti) )
+ def tearDown(self):
+ del filters[0]
+
+ SecurityTest.tearDown(self)
+
def test_processActions( self ):
"""
Are the correct, permitted methods returned for actions?
"""
- filterwarnings('ignore', category=DeprecationWarning)
-
site = self.site
portal = site._setObject( 'portal', PortalFolder(id='portal') )
portal.manage_addProduct = { 'FooProduct' : DummyFactory(portal) }
@@ -136,6 +142,12 @@
class TypeInfoTests(TestCase):
+ def setUp(self):
+ filterwarnings('ignore', category=DeprecationWarning)
+
+ def tearDown(self):
+ del filters[0]
+
def test_construction( self ):
ti = self._makeInstance( 'Foo'
, description='Description'
@@ -232,8 +244,6 @@
self.failIf( 'slot' in visible )
def test_getActionById( self ):
- filterwarnings('ignore', category=DeprecationWarning)
-
ti = self._makeInstance( 'Foo' )
marker = []
self.assertEqual( id( ti.getActionById( 'view', marker ) )
More information about the CMF-checkins
mailing list