We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ddrouin@Dave:~> git clone https://github.com/mitsuhiko/flask.git Cloning into 'flask'...
version = '0.9-dev' appears in flask/flask/init.py
Tests run with Python 2.7.3 on Ubuntu 12.04 LTS
ddrouin@Dave:~/flask> python run-tests.py ........................................................................................................................................E.................................................. ====================================================================== ERROR: test_jsonify (flask.testsuite.helpers.JSONTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ddrouin/flask/flask/testsuite/helpers.py", line 88, in test_jsonify self.assert_equal(rv.mimetype, 'application/json', url) TypeError: assert_equal() takes exactly 3 arguments (4 given) ---------------------------------------------------------------------- Ran 187 tests in 0.706s FAILED (errors=1)
/kw and /dict work fine, occurs on /unpadded. simplejson is present, version 2.3.2
line 136 in flask/flask.helpers has:
if 'padded' in kwargs: .... return current_app.response_class(content, mimetype='application/javascript')
So the defect is triggered by kwargs containing {'padded': False}. To fix this - I ended up changing my copy to this and now the tests all pass:
if 'padded' in kwargs: padded = kwargs['padded'] del kwargs['padded'] else: padded = False if padded: if isinstance(padded, str): callback = request.args.get(padded) or 'jsonp' else: callback = request.args.get('callback') or \ request.args.get('jsonp') or 'jsonp' json_str = json.dumps(dict(*args, **kwargs), indent=None) content = str(callback) + "(" + json_str + ")" return current_app.response_class(content, mimetype='application/javascript') return current_app.response_class(json.dumps(dict(*args, **kwargs), indent=None if request.is_xhr else 2), mimetype='application/json')
The text was updated successfully, but these errors were encountered:
Tests run fine for me.
Sorry, something went wrong.
Can't reconstruct this on 4a156d3.
Can't reproduce, looks like it's fixed.
No branches or pull requests
version = '0.9-dev' appears in flask/flask/init.py
Tests run with Python 2.7.3 on Ubuntu 12.04 LTS
/kw and /dict work fine, occurs on /unpadded.
simplejson is present, version 2.3.2
line 136 in flask/flask.helpers has:
So the defect is triggered by kwargs containing {'padded': False}. To fix this - I ended up changing my copy to this and now the tests all pass:
The text was updated successfully, but these errors were encountered: