Fixed #1846
This commit is contained in:
parent
41f3d67dff
commit
390cd5e4ee
2 changed files with 10 additions and 1 deletions
|
|
@ -19,6 +19,10 @@ from werkzeug.exceptions import BadRequest
|
|||
from werkzeug.http import parse_cache_control_header, parse_options_header
|
||||
from werkzeug.http import http_date
|
||||
from flask._compat import StringIO, text_type
|
||||
try:
|
||||
import simplejson
|
||||
except ImportError:
|
||||
import json as simplejson
|
||||
|
||||
|
||||
def has_encoding(name):
|
||||
|
|
@ -114,6 +118,10 @@ class TestJSON(object):
|
|||
assert rv.mimetype == 'application/json'
|
||||
assert flask.json.loads(rv.data) == d
|
||||
|
||||
def test_simplejson_does_not_escape_slashes(self):
|
||||
"""Test that \\/ is no longer standard behavior."""
|
||||
assert '\\/' not in simplejson.dumps('/')
|
||||
|
||||
def test_jsonify_dicts(self):
|
||||
"""Test jsonify with dicts and kwargs unpacking."""
|
||||
d = dict(
|
||||
|
|
|
|||
3
tox.ini
3
tox.ini
|
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = {py26,py27,pypy}-{lowest,release,devel}, {py33,py34,py35}-{release,devel}
|
||||
envlist = {py26,py27,pypy}-{lowest,release,devel,simplejson}, {py33,py34,py35}-{release,devel,simplejson}
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
|
|
@ -19,6 +19,7 @@ deps=
|
|||
devel: git+https://github.com/pallets/jinja.git
|
||||
devel: git+https://github.com/pallets/itsdangerous.git
|
||||
devel: git+https://github.com/jek/blinker.git
|
||||
simplejson: simplejson
|
||||
|
||||
[testenv:docs]
|
||||
deps = sphinx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue