[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Publisher/Browser/tests - testResources.py:1.2
Steve Alexander
steve@cat-box.net
Fri, 14 Jun 2002 05:25:21 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Publisher/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv335/lib/python/Zope/App/Publisher/Browser/tests
Modified Files:
testResources.py
Log Message:
the unit tests didn't cover the resourece not being found, so
the fact that NotFoundError wasn't imported into Resources.py went
unnoticed.
fixed unit test coverage, and error.
=== Zope3/lib/python/Zope/App/Publisher/Browser/tests/testResources.py 1.1 => 1.2 ===
self.assertEqual(resource(), 42)
+ def testNotFound(self):
+ from Zope.App.Publisher.Browser.Resources import Resources
+ from Zope.Exceptions import NotFoundError
+ request = TestRequest()
+ view = Resources(None, request)
+ self.assertRaises(NotFoundError,
+ view.publishTraverse,
+ request, 'test'
+ )
+
def test_suite():