Skip to content

Commit

Permalink
- Set up and tear down security manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Nov 17, 2001
1 parent cac6840 commit edbaf9d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/testPythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
import ZODB
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))
Expand All @@ -107,6 +107,13 @@ def readf(name):
), '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 {})
Expand Down

0 comments on commit edbaf9d

Please sign in to comment.