diff options
author | ianb <devnull@localhost> | 2007-02-01 03:40:28 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2007-02-01 03:40:28 +0000 |
commit | a5b2744a4d344d7c00d699f77974e6b9b809915e (patch) | |
tree | 0a59041e36087f4f5bf8496ddbd0f78cd45ab4d3 /tests | |
parent | abfca84b011f8b36132b67f55cb0a19f855147ae (diff) | |
download | paste-1.2.tar.gz |
Fix for FileApp replying to non-GET requests, and giving the body for HEAD requests1.2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_fileapp.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_fileapp.py b/tests/test_fileapp.py index ef6e366..000028c 100644 --- a/tests/test_fileapp.py +++ b/tests/test_fileapp.py @@ -195,3 +195,15 @@ def test_file_cache(): status=304) res = app.get('/', headers={'If-Modified-Since': 'invalid date'}, status=400) + +def test_methods(): + from paste import fileapp + filename = os.path.join(os.path.dirname(__file__), + 'urlparser_data', 'secured.txt') + app = TestApp(fileapp.FileApp(filename)) + get_res = app.get('') + res = app.get('', extra_environ={'REQUEST_METHOD': 'HEAD'}) + assert res.headers == get_res.headers + assert not res.body + app.post('', status=405) # Method Not Allowed + |