[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security/tests - testChecker.py:1.1.2.4 testRestrictedInterpreter.py:1.1.2.8
Jim Fulton
jim@zope.com
Mon, 22 Apr 2002 18:39:51 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv556/lib/python/Zope/Security/tests
Modified Files:
Tag: SecurityProxy-branch
testChecker.py testRestrictedInterpreter.py
Log Message:
Refactored the Zope.Security package to move the code from the
CheckerRegistry and Proxy modules into the checker module, as the code
is tightly coupled and the separation was causing circular imports.
It's not clear what the role of the Proxy module should be.
Also cleaned up the dependencies between the Proxy factory and the
registry and merged the check utility function with the check Checker
method.
=== Zope3/lib/python/Zope/Security/tests/testChecker.py 1.1.2.3 => 1.1.2.4 ===
from Zope.App.Security.SecurityManagement import setSecurityPolicy
from Zope.Security._Proxy import getChecker, getObject
-from Zope.Security.CheckerRegistry import defineChecker
+from Zope.Security.Checker import defineChecker
from Zope.Security.Proxy import Proxy
class SecurityPolicy:
=== Zope3/lib/python/Zope/Security/tests/testRestrictedInterpreter.py 1.1.2.7 => 1.1.2.8 ===
from Zope.Security.RestrictedInterpreter import RestrictedInterpreter
from Zope.Security.Proxy import Proxy
-from Zope.Security.CheckerRegistry import defineChecker
+from Zope.Security.Checker import defineChecker
from Zope.Testing.CleanUp import cleanUp
@@ -35,11 +35,11 @@
# make sure we've really got proxies
import types
from Zope.Security.Checker import NamesChecker
- checker = NamesChecker(['Proxy', '_Proxy'])
+ checker = NamesChecker(['Proxy'])
defineChecker(Zope.Security.Proxy, checker)
checker = NamesChecker(['BuiltinFunctionType'])
defineChecker(types, checker)
- code = ("from Zope.Security.Proxy import Proxy, _Proxy\n"
+ code = ("from Zope.Security.Proxy import Proxy\n"
"import types\n"
"assert type(id) is not types.BuiltinFunctionType\n"
)