Browse Source

Fixed warning and broken tests on 3.3

pull/1208/head
Armin Ronacher 11 years ago
parent
commit
d094d5b6fc
  1. 5
      flask/testsuite/helpers.py
  2. 4
      flask/testsuite/testing.py

5
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

4
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):

Loading…
Cancel
Save