[ZPT] CVS: Zope/lib/python/Products/PageTemplates/tests - testHTMLTests.py:1.10.2.2

Shane Hathaway shane@cvs.zope.org
Fri, 11 Jan 2002 16:14:58 -0500


Update of /cvs-repository/Zope/lib/python/Products/PageTemplates/tests
In directory cvs.zope.org:/tmp/cvs-serv22505

Modified Files:
      Tag: Zope-2_5-branch
	testHTMLTests.py 
Log Message:
Same as head.


=== Zope/lib/python/Products/PageTemplates/tests/testHTMLTests.py 1.10.2.1 => 1.10.2.2 ===
 from Products.PageTemplates.PageTemplate import PageTemplate
 from AccessControl import SecurityManager
+from AccessControl.SecurityManagement import noSecurityManager
 
 from Acquisition import Implicit
 class AqPageTemplate(Implicit, PageTemplate):
@@ -54,9 +55,11 @@
       f.t = AqPageTemplate()
       self.policy = UnitTestSecurityPolicy()
       self.oldPolicy = SecurityManager.setSecurityPolicy( self.policy )
+      noSecurityManager()  # Use the new policy.
 
    def tearDown(self):
       SecurityManager.setSecurityPolicy( self.oldPolicy )
+      noSecurityManager()  # Reset to old policy.
 
    def assert_expected(self, t, fname, *args, **kwargs):
       t.write(util.read_input(fname))