Commit a72f5e50 authored by Fred Drake's avatar Fred Drake

Fix a couple of docstrings.

_request(): Avoid recompiling the regular expression on every call.
parent 491c5a04
......@@ -196,7 +196,7 @@ class SecurityTests(unittest.TestCase) :
def testPublicFuncWithWrongAuth(self):
""" testing PublicFunc"""
""" testing PublicFunc with wrong auth"""
path = "/folder1/object1/public_func"
......@@ -216,7 +216,7 @@ class SecurityTests(unittest.TestCase) :
def testProtectedFunc(self):
""" testing PrivateFunc"""
""" testing ProtectedFunc"""
path = "/folder1/object1/protected_func"
......@@ -264,15 +264,14 @@ class SecurityTests(unittest.TestCase) :
def _request(self,*args,**kw):
reg = re.compile("Status: ([0-9]{1,4}) (.*)",re.I)\
_reg = re.compile("Status: ([0-9]{1,4}) (.*)",re.I)
def _request(self,*args,**kw):
io =cStringIO.StringIO()
kw['s']=io
ZPublisher.Zope(*args,**kw)
outp = io.getvalue()
mo = reg.search(outp)
mo = self._reg.search(outp)
code,txt = mo.groups()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment