[Zope3-checkins] CVS: Zope3/lib/python/Zope/Security/tests - testChecker.py:1.4 testRestrictedInterpreter.py:1.3

Jeremy Hylton jeremy@zope.com
Thu, 5 Sep 2002 16:46:29 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv651

Modified Files:
	testChecker.py testRestrictedInterpreter.py 
Log Message:
Use CleanUp as mixin class per docs.




=== Zope3/lib/python/Zope/Security/tests/testChecker.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/Security/tests/testChecker.py:1.3	Wed Jul 17 12:54:23 2002
+++ Zope3/lib/python/Zope/Security/tests/testChecker.py	Thu Sep  5 16:46:29 2002
@@ -19,7 +19,7 @@
 
 from unittest import TestCase, TestSuite, main, makeSuite
 from Zope.Security.Checker import NamesChecker, CheckerPublic
-from Zope.Testing.CleanUp import cleanUp
+from Zope.Testing.CleanUp import CleanUp
 from Zope.Security.ISecurityPolicy import ISecurityPolicy
 from Zope.Exceptions import Forbidden, Unauthorized
 from Zope.Security.SecurityManagement import setSecurityPolicy
@@ -64,15 +64,15 @@
     def sete(self, v): pass
     e = property(gete, sete)
 
-class Test(TestCase):
+class Test(TestCase, CleanUp):
 
     def setUp(self):
+        CleanUp.setUp(self)
         self.__oldpolicy = setSecurityPolicy(SecurityPolicy())
 
     def tearDown(self):
         setSecurityPolicy(self.__oldpolicy)
-        cleanUp()
-
+        CleanUp.tearDown(self)
 
     # check_getattr cases:
     #


=== Zope3/lib/python/Zope/Security/tests/testRestrictedInterpreter.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/Security/tests/testRestrictedInterpreter.py:1.2	Mon Jun 10 19:29:34 2002
+++ Zope3/lib/python/Zope/Security/tests/testRestrictedInterpreter.py	Thu Sep  5 16:46:29 2002
@@ -4,15 +4,16 @@
 from Zope.Security.Proxy import ProxyFactory
 from Zope.Security.Checker import defineChecker
 
-from Zope.Testing.CleanUp import cleanUp
+from Zope.Testing.CleanUp import CleanUp
 
-class RITests(unittest.TestCase):
+class RITests(unittest.TestCase, CleanUp):
 
     def setUp(self):
+        CleanUp.setUp(self)
         self.rinterp = RestrictedInterpreter()
 
     def tearDown(self):
-        cleanUp()
+        CleanUp.tearDown(self)
 
     def testExec(self):
         self.rinterp.ri_exec("str(type(1))\n")