[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security/tests - test_Proxy.py:1.1.2.4

Guido van Rossum guido@python.org
Thu, 18 Apr 2002 14:00:35 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv31209

Modified Files:
      Tag: SecurityProxy-branch
	test_Proxy.py 
Log Message:
Test getObject and getChecker.


=== Zope3/lib/python/Zope/Security/tests/test_Proxy.py 1.1.2.3 => 1.1.2.4 ===
 
-from Zope.Security._Proxy import _Proxy
+from Zope.Security._Proxy import _Proxy, getObject, getChecker
 
 class Checker:
     def check_getattr(self, object, name):
@@ -40,6 +40,12 @@
 
     def testGetAttrFail(self):
         self.assertRaises(RuntimeError, lambda: self.p.bar)
+
+    def testGetObject(self):
+        self.assertEqual(self.x, getObject(self.p))
+
+    def testGetChecker(self):
+        self.assertEqual(self.c, getChecker(self.p))
 
 def test_suite():
     return unittest.makeSuite(ProxyTests)