Commit 246610dd authored by Tres Seaver's avatar Tres Seaver

Add clarification of handling of missing resources.

See #11.
parent 66ecc1ac
...@@ -69,6 +69,17 @@ PageTemplateResource's __call__ renders the template ...@@ -69,6 +69,17 @@ PageTemplateResource's __call__ renders the template
... if not isinstance(resource, PageTemplateResource): ... if not isinstance(resource, PageTemplateResource):
... self.assertEquals(resource(), base_url % r) ... self.assertEquals(resource(), base_url % r)
Missing resources
~~~~~~~~~~~~~~~~~
Looking up a missing resource raises a ``KeyError``, which the publisher
then maps onto an HTTP 404 ("Not Found") response:
>>> self.folder.unrestrictedTraverse('testoid/++resource++nonesuch.txt')
Traceback (most recent call last):
...
KeyError: ...
Clean up Clean up
-------- --------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment