[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security/tests - test_Proxy.py:1.1.2.13
Guido van Rossum
guido@python.org
Tue, 23 Apr 2002 10:42:28 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv30508
Modified Files:
Tag: SecurityProxy-branch
test_Proxy.py
Log Message:
Check that a proxy for a class matches the bare class as a dict key.
=== Zope3/lib/python/Zope/Security/tests/test_Proxy.py 1.1.2.12 => 1.1.2.13 ===
self.assertEqual(self.c, getChecker(self.p))
+ def testProxiedClassicClassAsDictKey(self):
+ class C:
+ pass
+ d = {C: C()}
+ pC = Proxy(C, self.c)
+ self.assertEqual(d[pC], d[C])
+
+ def testProxiedNewClassAsDictKey(self):
+ class C(object):
+ pass
+ d = {C: C()}
+ pC = Proxy(C, self.c)
+ self.assertEqual(d[pC], d[C])
+
def test_suite():
return unittest.makeSuite(ProxyTests)