[CMF-checkins] CVS: CMF/CMFDefault/tests - test_Discussions.py:1.7
Tres Seaver
tseaver@zope.com
Thu, 29 Nov 2001 22:08:45 -0500
Update of /cvs-repository/CMF/CMFDefault/tests
In directory cvs.zope.org:/tmp/cvs-serv3849/CMFDefault/tests
Modified Files:
test_Discussions.py
Log Message:
- Scrub out global effects
=== CMF/CMFDefault/tests/test_Discussions.py 1.6 => 1.7 ===
get_transaction().begin()
self._policy = UnitTestSecurityPolicy()
- SecurityManager.setSecurityPolicy( self._policy )
+ self._oldPolicy = SecurityManager.setSecurityPolicy(self._policy)
self.connection = Zope.DB.open()
self.root = self.connection.root()[ 'Application' ]
self.root._setObject( 'portal_discussion', DiscussionTool() )
@@ -58,6 +58,7 @@
del self._policy
get_transaction().abort()
self.connection.close()
+ SecurityManager.setSecurityPolicy( self._oldPolicy )
def test_policy( self ):