[Zope-Checkins] CVS: Zope/lib/python/AccessControl/tests - testZopeGuards.py:1.1.2.2 testZopeSecurityPolicy.py:1.5.6.1

Tres Seaver tseaver at zope.com
Fri Jan 9 14:07:18 EST 2004


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

Modified Files:
      Tag: Zope-2_6-branch
	testZopeGuards.py testZopeSecurityPolicy.py 
Log Message:


  - Collector #1168: Import error in
    lib/python/AccessControl/ZopeSecurityPolicy.py:

    o Import the name UnicodeType, since we use it.

    o Add a test that we can validate Unicode names.

    o Fix a test which broke under ZOPE_SECURITY_POLICY=Python, because
      the "base" exception (zExceptions.Unauthorize) is raised in that
      case, rather than the "derived" one (AccessControl.Unauthorized).


=== Zope/lib/python/AccessControl/tests/testZopeGuards.py 1.1.2.1 => 1.1.2.2 ===
--- Zope/lib/python/AccessControl/tests/testZopeGuards.py:1.1.2.1	Thu Jan  8 15:12:07 2004
+++ Zope/lib/python/AccessControl/tests/testZopeGuards.py	Fri Jan  9 14:07:17 2004
@@ -88,7 +88,7 @@
 
     def test_attr_handler_table(self):
         from AccessControl.SimpleObjectPolicies import ContainerAssertions
-        from AccessControl import Unauthorized
+        from zExceptions import Unauthorized
         sm = SecurityManager()
         self.setSecurityManager(sm)
         d = {}


=== Zope/lib/python/AccessControl/tests/testZopeSecurityPolicy.py 1.5 => 1.5.6.1 ===
--- Zope/lib/python/AccessControl/tests/testZopeSecurityPolicy.py:1.5	Wed Aug 14 17:28:08 2002
+++ Zope/lib/python/AccessControl/tests/testZopeSecurityPolicy.py	Fri Jan  9 14:07:17 2004
@@ -225,6 +225,10 @@
         assert policy.validate('', '', 'aq_explicit', '', None)
         assert policy.validate('', '', 'aq_inner', '', None)
 
+    def testUnicodeName(self):
+        policy = self.policy
+        assert policy.validate('', '', u'foo', '', None)
+
     if 0:
         # This test purposely generates a log entry.
         # Enable it if you don't mind it adding to the log.




More information about the Zope-Checkins mailing list