[Zope-Checkins] CVS: Zope/lib/python/AccessControl/tests - testClassSecurityInfo.py:1.4 testDeprecatedAPI.py:1.5 testPasswordDigest.py:1.5 testSecurity.py:1.11

Guido van Rossum guido@python.org
Mon, 27 Jan 2003 17:55:30 -0500


Update of /cvs-repository/Zope/lib/python/AccessControl/tests
In directory cvs.zope.org:/tmp/cvs-serv6180/tests

Modified Files:
	testClassSecurityInfo.py testDeprecatedAPI.py 
	testPasswordDigest.py testSecurity.py 
Log Message:
Enforce the rule that unit tests have no docstrings.

Reduced the size of the password in testLongPassword() so that that
test doesn't take a minute or more.


=== Zope/lib/python/AccessControl/tests/testClassSecurityInfo.py 1.3 => 1.4 ===
--- Zope/lib/python/AccessControl/tests/testClassSecurityInfo.py:1.3	Wed Aug 14 17:28:08 2002
+++ Zope/lib/python/AccessControl/tests/testClassSecurityInfo.py	Mon Jan 27 17:55:27 2003
@@ -21,7 +21,7 @@
 
 
     def testSetPermissionDefault(self):
-        """Test setting default roles for permissions."""
+        # Test setting default roles for permissions.
 
         # Setup a test class with default role -> permission decls.
         class Test(Folder):


=== Zope/lib/python/AccessControl/tests/testDeprecatedAPI.py 1.4 => 1.5 ===
--- Zope/lib/python/AccessControl/tests/testDeprecatedAPI.py:1.4	Wed Aug 14 17:28:08 2002
+++ Zope/lib/python/AccessControl/tests/testDeprecatedAPI.py	Mon Jan 27 17:55:27 2003
@@ -30,7 +30,7 @@
             module='AccessControl')
 
     def testDeprecatedHasRole(self):
-        """hasRole has been deprecated, we expect a warning."""
+        # hasRole has been deprecated, we expect a warning.
         try:
             self.userObject.hasRole(None)
         except DeprecationWarning:
@@ -39,7 +39,7 @@
             self.fail('Expected DeprecationWarning, none given')
 
     def testAllowed(self):
-        """hasRole is an alias for allowed, which should be unaffected."""
+        # hasRole is an alias for allowed, which should be unaffected.
         try:
             self.userObject.allowed(None)
         except DeprecationWarning:


=== Zope/lib/python/AccessControl/tests/testPasswordDigest.py 1.4 => 1.5 ===
--- Zope/lib/python/AccessControl/tests/testPasswordDigest.py:1.4	Wed Aug 14 17:28:08 2002
+++ Zope/lib/python/AccessControl/tests/testPasswordDigest.py	Mon Jan 27 17:55:27 2003
@@ -57,7 +57,7 @@
             assert not AuthEncoding.pw_validate(enc, 'xxx')
 
     def testLongPassword(self):
-        pw = 'Pw' * 10000
+        pw = 'Pw' * 2000
         for id in AuthEncoding.listSchemes():
             enc = AuthEncoding.pw_encrypt(pw, id)
             assert enc != pw


=== Zope/lib/python/AccessControl/tests/testSecurity.py 1.10 => 1.11 ===
--- Zope/lib/python/AccessControl/tests/testSecurity.py:1.10	Wed Aug 14 17:28:08 2002
+++ Zope/lib/python/AccessControl/tests/testSecurity.py	Mon Jan 27 17:55:27 2003
@@ -59,10 +59,8 @@
         self.failUnlessRaises(Unauthorized, html, myinst=myclass())
 
     def testSecurityInSyntax(self):
-        '''
-        Ensures syntax errors are thrown for an expr with restricted
-        syntax.
-        '''
+        # Ensures syntax errors are thrown for an expr with restricted
+        # syntax.
         expr = '<dtml-var expr="(lambda x, _read=(lambda ob:ob): x.y)(c)">'
         try:
             # This would be a security hole.