Mercurial > hg > FileServer
comparison tests/doctest.txt @ 18:76c939271534
introduce a test that i dont know what it means
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 29 Feb 2012 16:05:08 -0800 |
parents | 27bd18f0a359 |
children |
comparison
equal
deleted
inserted
replaced
17:27bd18f0a359 | 18:76c939271534 |
---|---|
81 Ensure you can't get to non-allowed resources:: | 81 Ensure you can't get to non-allowed resources:: |
82 | 82 |
83 >>> response = testapp.get('/../exampleBADBADBAD', status=404) | 83 >>> response = testapp.get('/../exampleBADBADBAD', status=404) |
84 >>> response.status # Not Found: we do not want to give away these resources | 84 >>> response.status # Not Found: we do not want to give away these resources |
85 404 | 85 404 |
86 | 86 >>> response = testapp.get('//') # XXX weird |
87 >>> response.status | |
88 301 | |
89 >>> location = response.header_dict['location'] | |
90 >>> shema, netloc, path, query, fragment = urlparse.urlsplit(location) | |
91 >>> path | |
92 '/' |