diff --git a/flask/testsuite/helpers.py b/flask/testsuite/helpers.py index c645dc14..b765528b 100644 --- a/flask/testsuite/helpers.py +++ b/flask/testsuite/helpers.py @@ -265,8 +265,9 @@ class SendfileTestCase(FlaskTestCase): # etags self.assert_equal(len(captured), 1) with catch_warnings() as captured: - from StringIO import StringIO as PYStringIO - f = PYStringIO('Test') + class PyStringIO(StringIO): + pass + f = PyStringIO('Test') f.name = 'test.txt' rv = flask.send_file(f) rv.direct_passthrough = False diff --git a/flask/testsuite/testing.py b/flask/testsuite/testing.py index de78746b..11ab763b 100644 --- a/flask/testsuite/testing.py +++ b/flask/testsuite/testing.py @@ -207,8 +207,8 @@ class TestToolsTestCase(FlaskTestCase): with app.test_client() as c: rv = c.post('http://domain.com/action?vodka=42', data={'gin': 43}) self.assert_equal(rv.status_code, 200) - self.assert_('gin' in flask.request.form) - self.assert_('vodka' in flask.request.args) + self.assert_true('gin' in flask.request.form) + self.assert_true('vodka' in flask.request.args) class SubdomainTestCase(FlaskTestCase):