Update of /cvs-repository/Packages/AccessControl/tests In directory cvs.zope.org:/tmp/cvs-serv7910/lib/python/AccessControl/tests
Modified Files: Tag: Zope-2_7-branch testZopeGuards.py Log Message: forgotten to commit additional unittest for leak in cAccessControl === Packages/AccessControl/tests/testZopeGuards.py 1.1.4.9 => 1.1.4.10 === --- Packages/AccessControl/tests/testZopeGuards.py:1.1.4.9 Tue Apr 5 17:17:44 2005 +++ Packages/AccessControl/tests/testZopeGuards.py Wed Aug 3 04:25:12 2005 @@ -89,6 +89,16 @@ def tearDown(self): self.setSecurityManager(self.__old) + def test_unauthorized(self): + obj, name = Method(), 'args' + value = getattr(obj, name) + rc = sys.getrefcount(value) + self.__sm.reject = True + self.assertRaises(Unauthorized, guarded_getattr, obj, name) + self.assert_(self.__sm.calls) + del self.__sm.calls[:] + self.assertEqual(rc, sys.getrefcount(value)) + def test_calls_validate_for_unknown_type(self): self.guarded_getattr(self, 'test_calls_validate_for_unknown_type') self.assert_(self.__sm.calls) _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins