[Zope-Checkins]
SVN: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/resource_ftest.txt
Assert that standard resources can't be traversed any further
(in other words,
Philipp von Weitershausen
philikon at philikon.de
Sun Jul 29 17:45:07 EDT 2007
Log message for revision 78473:
Assert that standard resources can't be traversed any further (in other words,
that the publishTraverse method on the Zope3 implementation, which we use now,
works as expected).
Changed:
U Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/resource_ftest.txt
-=-
Modified: Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/resource_ftest.txt
===================================================================
--- Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/resource_ftest.txt 2007-07-29 18:24:18 UTC (rev 78472)
+++ Zope/branches/philikon-aq/lib/python/Products/Five/browser/tests/resource_ftest.txt 2007-07-29 21:45:06 UTC (rev 78473)
@@ -33,6 +33,15 @@
HTTP/1.1 200 OK
...
+Image resources can't be traversed further:
+
+ >>> print http(r'''
+ ... GET /test_folder_1_/testoid/++resource++pattern.png/more HTTP/1.1
+ ... Authorization: Basic manager:r00t
+ ... ''')
+ HTTP/1.1 404 Not Found
+ ...
+
File resource
~~~~~~~~~~~~~
@@ -43,6 +52,15 @@
HTTP/1.1 200 OK
...
+File resources can't be traversed further:
+
+ >>> print http(r'''
+ ... GET /test_folder_1_/testoid/++resource++style.css/more HTTP/1.1
+ ... Authorization: Basic manager:r00t
+ ... ''')
+ HTTP/1.1 404 Not Found
+ ...
+
Template resource
~~~~~~~~~~~~~~~~~
@@ -53,6 +71,15 @@
HTTP/1.1 200 OK
...
+Template resources can't be traversed further:
+
+ >>> print http(r'''
+ ... GET /test_folder_1_/testoid/++resource++cockatiel.html/more HTTP/1.1
+ ... Authorization: Basic manager:r00t
+ ... ''')
+ HTTP/1.1 404 Not Found
+ ...
+
Resource directory
~~~~~~~~~~~~~~~~~~
@@ -77,19 +104,7 @@
This is a resource in a subdirectory of a normal resource to test traversal.
<BLANKLINE>
-
-We also can traverse into sub-directories:
-
>>> print http(r'''
- ... GET /test_folder_1_/testoid/++resource++fivetest_resources/resource_subdir/resource.txt HTTP/1.1
- ... Authorization: Basic manager:r00t
- ... ''')
- HTTP/1.1 200 OK
- ...
- This is a resource in a subdirectory of a normal resource to test traversal.
- <BLANKLINE>
-
- >>> print http(r'''
... GET /test_folder_1_/testoid/++resource++fivetest_resources/resource_subdir/resource.html HTTP/1.1
... Authorization: Basic manager:r00t
... ''')
@@ -105,6 +120,13 @@
</html>
<BLANKLINE>
+ >>> print http(r'''
+ ... GET /test_folder_1_/testoid/++resource++fivetest_resources/resource_subdir/not-existant HTTP/1.1
+ ... Authorization: Basic manager:r00t
+ ... ''')
+ HTTP/1.1 404 Not Found
+ ...
+
Clean up
--------
More information about the Zope-Checkins
mailing list