summaryrefslogtreecommitdiff
path: root/tests/test_exceptions/test_httpexceptions.py
diff options
context:
space:
mode:
authorIan Bicking <ian@ianbicking.org>2007-09-21 03:40:46 +0000
committerIan Bicking <ian@ianbicking.org>2007-09-21 03:40:46 +0000
commitd5209c2272de27cbdc3edef8386a8e5bf430edcd (patch)
treeb661f3fe959f62931348a439e44f3e88144622ab /tests/test_exceptions/test_httpexceptions.py
parent1e9c24563b4e9821c4e988142b9f0d90a0f92930 (diff)
downloadpaste-git-d5209c2272de27cbdc3edef8386a8e5bf430edcd.tar.gz
Simplify the way HTTPExceptionHandler catches HTTPExceptions. You can no longer raise httpexceptions in your app_iter
Diffstat (limited to 'tests/test_exceptions/test_httpexceptions.py')
-rw-r--r--tests/test_exceptions/test_httpexceptions.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/test_exceptions/test_httpexceptions.py b/tests/test_exceptions/test_httpexceptions.py
index de1afd3..4ca64a4 100644
--- a/tests/test_exceptions/test_httpexceptions.py
+++ b/tests/test_exceptions/test_httpexceptions.py
@@ -58,33 +58,6 @@ def test_template():
assert '<p>A fun and <b>happy</b> message.</p>' in \
e.html({'ping': 'fun', 'pong': 'happy'})
-def test_iterator_application():
- """
- This tests to see that an iterator's exceptions are caught by
- HTTPExceptionHandler
- """
- def basic_found(environ, start_response):
- raise HTTPFound("/bing/foo")
- return ['result']
- app = HTTPExceptionHandler(basic_found)
- (status, headers, content, errors) = raw_interactive(app)
- assert '302 Found' == status
- def make_iter(application):
- def iterapp(environ, start_response):
- result = application(environ, start_response)
- for chunk in result:
- yield chunk
- return iterapp
- app = HTTPExceptionHandler(make_iter(basic_found))
- (status, headers, content, errors) = raw_interactive(app)
- assert '302 Found' == status
- def iterate_found(environ, start_response):
- raise HTTPFound("/bing/foo")
- yield 'result'
- app = HTTPExceptionHandler(iterate_found)
- (status, headers, content, errors) = raw_interactive(app)
- assert '302 Found' == status
-
def test_redapp():
""" check that redirect returns the correct, expected results """
saved = []