From d5209c2272de27cbdc3edef8386a8e5bf430edcd Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Fri, 21 Sep 2007 03:40:46 +0000 Subject: Simplify the way HTTPExceptionHandler catches HTTPExceptions. You can no longer raise httpexceptions in your app_iter --- tests/test_exceptions/test_httpexceptions.py | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'tests/test_exceptions/test_httpexceptions.py') 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 '

A fun and happy message.

' 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 = [] -- cgit v1.2.1