[Zope-Checkins] CVS: Packages/AccessControl/securitySuite - testSecurity.py:1.3

Fred L. Drake" <fdrake@acm.org> Fred L. Drake" <fdrake@acm.org>
Mon, 1 Oct 2001 14:36:40 -0400


Update of /cvs-repository/Packages/AccessControl/securitySuite
In directory cvs.zope.org:/tmp/cvs-serv28434

Modified Files:
	testSecurity.py 
Log Message:
Fix a couple of docstrings.
_request(): Avoid recompiling the regular expression on every call.


=== Packages/AccessControl/securitySuite/testSecurity.py 1.2 => 1.3 ===
 
     def testPublicFuncWithWrongAuth(self):
-        """ testing PublicFunc"""
+        """ testing PublicFunc with wrong auth"""
 
         path = "/folder1/object1/public_func" 
 
@@ -216,7 +216,7 @@
 
 
     def testProtectedFunc(self):
-        """ testing PrivateFunc"""
+        """ testing ProtectedFunc"""
 
         path = "/folder1/object1/protected_func" 
 
@@ -264,15 +264,14 @@
 
 
 
-    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()