summaryrefslogtreecommitdiff
path: root/tests/test_exceptions/test_httpexceptions.py
diff options
context:
space:
mode:
authorcce <devnull@localhost>2005-12-15 02:17:04 +0000
committercce <devnull@localhost>2005-12-15 02:17:04 +0000
commite22a8345b4e973665118b33988a92faf5908db89 (patch)
treec6f0bbf79cf63830fe8cdc0e745c42cfe23c4899 /tests/test_exceptions/test_httpexceptions.py
parentc9c44b800d8920466622496fa4b6a5be6dfc8695 (diff)
downloadpaste-e22a8345b4e973665118b33988a92faf5908db89.tar.gz
not just direct iterators break this, but middleware that convert the result into an iteration
Diffstat (limited to 'tests/test_exceptions/test_httpexceptions.py')
-rw-r--r--tests/test_exceptions/test_httpexceptions.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_exceptions/test_httpexceptions.py b/tests/test_exceptions/test_httpexceptions.py
index 4e958ce..5f72b20 100644
--- a/tests/test_exceptions/test_httpexceptions.py
+++ b/tests/test_exceptions/test_httpexceptions.py
@@ -53,6 +53,15 @@ def test_iterator_application():
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'