[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.22.2.4
Steve Alexander
steve@cat-box.net
Fri, 16 May 2003 09:01:38 -0400
Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv4848/src/zope/security
Modified Files:
Tag: stevea-decorators-branch
checker.py
Log Message:
Added BasicTypes_examples to checkers, to help with tests that need to
check that BasicTypes are handled a particular way.
Added test of ContextWrapper_hook.
=== Zope3/src/zope/security/checker.py 1.22.2.3 => 1.22.2.4 ===
--- Zope3/src/zope/security/checker.py:1.22.2.3 Thu May 15 10:49:36 2003
+++ Zope3/src/zope/security/checker.py Fri May 16 09:01:37 2003
@@ -577,6 +577,22 @@
datetime.date: NoProxy,
datetime.time: NoProxy,
}
+# Available for tests. Located here so it can be kept in sync with BasicTypes.
+BasicTypes_examples = {
+ object: object(),
+ int: 65536,
+ float: -1.4142,
+ long: 65536l,
+ complex: -1.4142j,
+ types.NoneType: None,
+ str: 'abc',
+ unicode: u'uabc',
+ type(True): True,
+ datetime.timedelta: datetime.timedelta(3),
+ datetime.datetime: datetime.datetime(2003, 1, 1),
+ datetime.date: datetime.date(2003, 1, 1),
+ datetime.time: datetime.time(23, 58)
+}
class _Sequence(object):
def __len__(self): return 0