Skip to content
Myr

Added testcase for json encoding parameter support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 41952d2 · Browse files · 1 file+12 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−0 removed

  • tests:+12 added−0 removed

1 file+12 added−0 removed

modified:tests/flask_tests.py+12 added
783 unmodified lines
784785786class JSONTestCase(unittest.TestCase):787788 def test_json_body_encoding(self):789 app = flask.Flask(__name__)790 app.debug = True791 @app.route('/')792 def index():793 return flask.request.json794795 c = app.test_client()796 resp = c.get('/', data=u'"Hällo Wörld"'.encode('iso-8859-15'),797 content_type='application/json; charset=iso-8859-15')798 assert resp.data == u'Hällo Wörld'.encode('utf-8')799800 def test_jsonify(self):801 d = dict(a=23, b=42, c=[1, 2, 3])802 app = flask.Flask(__name__)803 @app.route('/kw')
799 unmodified lines