forked from orbit-oss/flask
Changed error message to include actual exception contents
This commit is contained in:
parent
290c371eb1
commit
1cd9e91810
2 changed files with 3 additions and 3 deletions
|
|
@ -59,7 +59,7 @@ class TestJSON(object):
|
|||
c = app.test_client()
|
||||
rv = c.post('/json', data=None, content_type='application/json')
|
||||
assert rv.status_code == 400
|
||||
assert b'No JSON object could be decoded' in rv.data
|
||||
assert b'Failed to decode JSON object' in rv.data
|
||||
|
||||
def test_post_empty_json_wont_add_exception_to_response_if_no_debug(self):
|
||||
app = flask.Flask(__name__)
|
||||
|
|
@ -71,7 +71,7 @@ class TestJSON(object):
|
|||
c = app.test_client()
|
||||
rv = c.post('/json', data=None, content_type='application/json')
|
||||
assert rv.status_code == 400
|
||||
assert b'No JSON object could be decoded' not in rv.data
|
||||
assert b'Failed to decode JSON object' not in rv.data
|
||||
|
||||
def test_json_bad_requests(self):
|
||||
app = flask.Flask(__name__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue