Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
246610dd
Commit
246610dd
authored
Feb 11, 2015
by
Tres Seaver
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add clarification of handling of missing resources.
See #11.
parent
66ecc1ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
src/Products/Five/browser/tests/resource.txt
src/Products/Five/browser/tests/resource.txt
+11
-0
No files found.
src/Products/Five/browser/tests/resource.txt
View file @
246610dd
...
@@ -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
--------
--------
...
...
Kirill Smelkov
@kirr
mentioned in commit
ccccf095
·
Jan 30, 2017
mentioned in commit
ccccf095
mentioned in commit ccccf0953235e2ee784b980641d272f873004668
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment