[CMF-checkins] CVS: CMF/CMFCore/tests - test_PortalFolder.py:1.13
Tres Seaver
tseaver@zope.com
Thu, 29 Nov 2001 22:08:45 -0500
Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv3849/CMFCore/tests
Modified Files:
test_PortalFolder.py
Log Message:
- Scrub out global effects
=== CMF/CMFCore/tests/test_PortalFolder.py 1.12 => 1.13 ===
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' ]
newSecurityManager( None, UnitTestUser().__of__( self.root ) )
@@ -90,6 +90,8 @@
def tearDown( self ):
get_transaction().abort()
self.connection.close()
+ SecurityManager.setSecurityPolicy( self._oldPolicy )
+
def test_deletePropagation( self ):
@@ -348,7 +350,7 @@
def setUp( self ):
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.manager = UnitTestUser().__of__( self.root )
@@ -362,6 +364,7 @@
def tearDown( self ):
get_transaction().abort()
self.connection.close()
+ SecurityManager.setSecurityPolicy( self._oldPolicy )
def test_listFolderContentsPerms( self ):
pass