Skip to content
Myr

Change strings to bytes to support Python3, typo in function name

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 294961e · Browse files · 1 file+4 added−4 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+4 added−4 removed

  • tests:+4 added−4 removed

1 file+4 added−4 removed

modified:tests/test_helpers.py+4 added-4 removed
47 unmodified lines
48 rv = c.get(url)49 assert rv.mimetype == 'application/json'50 assert flask.json.loads(rv.data)['x'] == http_date(d.timetuple())5152 def test_post_empty_json_adds_exception_to_reponse_content_in_debug(self):52 def test_post_empty_json_adds_exception_to_response_content_in_debug(self):53 app = flask.Flask(__name__)54 app.config['DEBUG'] = True55 @app.route('/json', methods=['POST'])56 def post_json():
1 unmodified line
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 'No JSON object could be decoded' in rv.data62 assert b'No JSON object could be decoded' in rv.data6364 def test_post_empty_json_doesnt_add_exception_to_reponse_if_no_debug(self):64 def test_post_empty_json_wont_add_exception_to_response_if_no_debug(self):65 app = flask.Flask(__name__)66 app.config['DEBUG'] = False67 @app.route('/json', methods=['POST'])68 def post_json():
1 unmodified line
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 'No JSON object could be decoded' not in rv.data74 assert b'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