# HG changeset patch # User Jeff Hammel # Date 1330559127 28800 # Node ID c8520774ddc912e7764b4b130376d4a7b3e983c8 # Parent e3993fa05b89e1b0b2b39abf7ad1dc823636174d add a test for reading subdirectory files diff -r e3993fa05b89 -r c8520774ddc9 tests/doctest.txt --- 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