[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security/tests - test_Proxy.py:1.1.2.2
Guido van Rossum
guido@python.org
Thu, 18 Apr 2002 11:49:30 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv29335
Modified Files:
Tag: SecurityProxy-branch
test_Proxy.py
Log Message:
Use assertRaises as intended.
=== Zope3/lib/python/Zope/Security/tests/test_Proxy.py 1.1.2.1 => 1.1.2.2 ===
def testGetAttrFail(self):
- try:
- self.p.bar
- except RuntimeError:
- pass
- else:
- self.fail("p.bar didn't raise RuntimeError")
+ self.assertRaises(RuntimeError, lambda: self.p.bar)
def test_suite():
return unittest.makeSuite(ProxyTests)