diff tests/doctest.txt @ 14:c8520774ddc9

add a test for reading subdirectory files
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 29 Feb 2012 15:45:27 -0800
parents 8127dde8da22
children 21673816cfde
line wrap: on
line diff
--- a/tests/doctest.txt	Wed Feb 29 15:42:14 2012 -0800
+++ b/tests/doctest.txt	Wed Feb 29 15:45:27 2012 -0800
@@ -65,7 +65,15 @@
     200
     >>> 'bar.txt' in response.body
     True
+    >>> response = testapp.get('/foo/bar.txt')
+    >>> response.status
+    200
+    >>> filename = os.path.join(here, 'example', 'foo', 'bar.txt')
+    >>> response.body == file(filename).read()
+    True
 
 Ensure you can't get to non-allowed resources::
 
     >>> response = testapp.get('/../exampleBADBADBAD')
+    >>> response.status # Not Found: we do not want to give away these resources
+    404