[Zope3-checkins] CVS: Zope3/src/zope/security/tests - test_checker.py:1.1.2.2 test_restrictedbuiltins.py:1.1.2.2 test_restrictedinterpreter.py:1.1.2.2 test_securitymanager.py:1.1.2.2

Guido van Rossum guido@python.org
Mon, 23 Dec 2002 17:03:21 -0500


Update of /cvs-repository/Zope3/src/zope/security/tests
In directory cvs.zope.org:/tmp/cvs-serv16449

Modified Files:
      Tag: NameGeddon-branch
	test_checker.py test_restrictedbuiltins.py 
	test_restrictedinterpreter.py test_securitymanager.py 
Log Message:
More internal renames that were missed the first time around.

=== Zope3/src/zope/security/tests/test_checker.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/security/tests/test_checker.py:1.1.2.1	Mon Dec 23 14:33:17 2002
+++ Zope3/src/zope/security/tests/test_checker.py	Mon Dec 23 17:03:20 2002
@@ -88,11 +88,11 @@
             __metaclass__ = types.ClassType
         class NewStyleClass:
             __metaclass__ = type
-        import Zope.Security
+        import zope.security
         not_a_type = object()
         defineChecker(ClassicClass, NamesChecker())
         defineChecker(NewStyleClass, NamesChecker())
-        defineChecker(Zope.Security, NamesChecker())
+        defineChecker(zope.security, NamesChecker())
         self.assertRaises(TypeError,
                 defineChecker, not_a_type, NamesChecker())
 


=== Zope3/src/zope/security/tests/test_restrictedbuiltins.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/security/tests/test_restrictedbuiltins.py:1.1.2.1	Mon Dec 23 14:33:17 2002
+++ Zope3/src/zope/security/tests/test_restrictedbuiltins.py	Mon Dec 23 17:03:20 2002
@@ -31,10 +31,10 @@
             return eval(expr, {'__builtins__': RestrictedBuiltins})
 
         self.assertEqual(e('__import__("sys").__name__'), "sys")
-        self.assertEqual(e('__import__("Zope.Security").__name__'), "Zope")
+        self.assertEqual(e('__import__("zope.security").__name__'), "zope")
         self.assertEqual(e(
-            '__import__("Zope.Security",{},None,("__doc__",)).__name__'),
-                         "Zope.Security")
+            '__import__("zope.security", {}, None, ["__doc__"]).__name__'),
+                         "zope.security")
         self.assertRaises(Forbidden, e, '__import__("sys").exit')
         
     


=== Zope3/src/zope/security/tests/test_restrictedinterpreter.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/security/tests/test_restrictedinterpreter.py:1.1.2.1	Mon Dec 23 14:33:17 2002
+++ Zope3/src/zope/security/tests/test_restrictedinterpreter.py	Mon Dec 23 17:03:20 2002
@@ -19,7 +19,7 @@
         self.rinterp.ri_exec("str(type(1))\n")
 
     def testImport(self):
-        self.rinterp.ri_exec("import Zope.Security.Proxy")
+        self.rinterp.ri_exec("import zope.security.proxy")
 
     def testWrapping(self):
         # make sure we've really got proxies
@@ -28,8 +28,8 @@
 
         checker = NamesChecker(['Proxy'])
 
-        import Zope.Security.Proxy
-        defineChecker(Zope.Security.Proxy, checker)
+        import zope.security.proxy
+        defineChecker(zope.security.proxy, checker)
 
         checker = NamesChecker(['BuiltinFunctionType'])
         defineChecker(types, checker)


=== Zope3/src/zope/security/tests/test_securitymanager.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/security/tests/test_securitymanager.py:1.1.2.1	Mon Dec 23 14:33:17 2002
+++ Zope3/src/zope/security/tests/test_securitymanager.py	Mon Dec 23 17:03:20 2002
@@ -17,7 +17,7 @@
 
 from zope.interface.verify import verifyClass
 
-from Zope.Security import SecurityManager
+from zope.security import securitymanager
 from zope.security.simplesecuritypolicies import \
      ParanoidSecurityPolicy, PermissiveSecurityPolicy
 from zope.security.securitycontext import SecurityContext
@@ -38,8 +38,8 @@
 
     def setUp( self ):
 
-        self._oldPolicy = SecurityManager._defaultPolicy
-        SecurityManager.setSecurityPolicy( ParanoidSecurityPolicy() )
+        self._oldPolicy = securitymanager._defaultPolicy
+        securitymanager.setSecurityPolicy( ParanoidSecurityPolicy() )
         self._context = SecurityContext( 'xyzzy' )
 
     def tearDown( self ):