From af5576a6c50ec849a824c1ace15f187d378db771 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 25 May 2013 19:46:26 +0200 Subject: [PATCH] fix iterator in testsuite helpers --- flask/testsuite/helpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flask/testsuite/helpers.py b/flask/testsuite/helpers.py index 21c9f791..90e9e020 100644 --- a/flask/testsuite/helpers.py +++ b/flask/testsuite/helpers.py @@ -15,7 +15,7 @@ import unittest from logging import StreamHandler from flask.testsuite import FlaskTestCase, catch_warnings, catch_stderr from werkzeug.http import parse_cache_control_header, parse_options_header -from flask._compat import StringIO, text_type +from flask._compat import StringIO, text_type, implements_iterator def has_encoding(name): @@ -485,6 +485,7 @@ class StreamingTestCase(FlaskTestCase): app = flask.Flask(__name__) app.testing = True called = [] + @implements_iterator class Wrapper(object): def __init__(self, gen): self._gen = gen @@ -492,7 +493,7 @@ class StreamingTestCase(FlaskTestCase): return self def close(self): called.append(42) - def next(self): + def __next__(self): return next(self._gen) @app.route('/') def index():