[Zope-Checkins] CVS: Zope/lib/python/Products/PythonScripts/tests - testPythonScript.py:1.8
Tres Seaver
tseaver@zope.com
Sat, 17 Nov 2001 05:23:43 -0500
Update of /cvs-repository/Zope/lib/python/Products/PythonScripts/tests
In directory cvs.zope.org:/tmp/cvs-serv21709/lib/python/Products/PythonScripts/tests
Modified Files:
testPythonScript.py
Log Message:
- Set up and tear down security manager.
=== Zope/lib/python/Products/PythonScripts/tests/testPythonScript.py 1.7 => 1.8 ===
from Products.PythonScripts.PythonScript import PythonScript
from AccessControl.SecurityManagement import newSecurityManager
+from AccessControl.SecurityManagement import noSecurityManager
-newSecurityManager(None, None)
if __name__=='__main__':
sys.path.append(os.path.join(os.pardir, os.pardir, os.pardir))
@@ -107,6 +107,13 @@
), 'r').read()
class TestPythonScriptNoAq(unittest.TestCase):
+
+ def setUp(self):
+ newSecurityManager(None, None)
+
+ def tearDown(self):
+ noSecurityManager()
+
def _newPS(self, txt, bind=None):
ps = PythonScript('ps')
ps.ZBindings_edit(bind or {})