Skip to content
Myr

Change tests to support older response format

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

authored by Keyan Pishdadian · committed by Keyan Pishdadian · parent 39e66ca · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • tests:+2 added−2 removed

1 file+2 added−2 removed

modified:tests/test_helpers.py+2 added-2 removed
57 unmodified lines
58 return None59 c = app.test_client()60 rv = c.post('/json', data=None, content_type='application/json')61 assert rv.status_code == 40062 assert '<p>No JSON object could be decoded</p>' in rv.data62 assert 'No JSON object could be decoded' in rv.data6364 def test_post_empty_json_doesnt_add_exception_to_reponse_if_no_debug(self):65 app = flask.Flask(__name__)66 app.config['DEBUG'] = False
3 unmodified lines
70 return None71 c = app.test_client()72 rv = c.post('/json', data=None, content_type='application/json')73 assert rv.status_code == 40074 assert '<p>No JSON object could be decoded</p>' not in rv.data74 assert 'No JSON object could be decoded' not in rv.data7576 def test_json_bad_requests(self):77 app = flask.Flask(__name__)78 @app.route('/json', methods=['POST'])
602 unmodified lines