Fixed warning and broken tests on 3.3

This commit is contained in:
Armin Ronacher 2014-02-08 22:29:46 +00:00
parent e67d9a04b2
commit d094d5b6fc
2 changed files with 5 additions and 4 deletions

View file

@ -265,8 +265,9 @@ class SendfileTestCase(FlaskTestCase):
# etags # etags
self.assert_equal(len(captured), 1) self.assert_equal(len(captured), 1)
with catch_warnings() as captured: with catch_warnings() as captured:
from StringIO import StringIO as PYStringIO class PyStringIO(StringIO):
f = PYStringIO('Test') pass
f = PyStringIO('Test')
f.name = 'test.txt' f.name = 'test.txt'
rv = flask.send_file(f) rv = flask.send_file(f)
rv.direct_passthrough = False rv.direct_passthrough = False

View file

@ -207,8 +207,8 @@ class TestToolsTestCase(FlaskTestCase):
with app.test_client() as c: with app.test_client() as c:
rv = c.post('http://domain.com/action?vodka=42', data={'gin': 43}) rv = c.post('http://domain.com/action?vodka=42', data={'gin': 43})
self.assert_equal(rv.status_code, 200) self.assert_equal(rv.status_code, 200)
self.assert_('gin' in flask.request.form) self.assert_true('gin' in flask.request.form)
self.assert_('vodka' in flask.request.args) self.assert_true('vodka' in flask.request.args)
class SubdomainTestCase(FlaskTestCase): class SubdomainTestCase(FlaskTestCase):