Browse Source

Bugfix: EnvironBuilder doesn't take `json`

pull/1984/head
Markus Unterwaditzer 8 years ago
parent
commit
136a833a8d
  1. 2
      flask/testing.py

2
flask/testing.py

@ -38,7 +38,7 @@ def make_test_environ_builder(app, path='/', base_url=None, *args, **kwargs):
if 'json' in kwargs: if 'json' in kwargs:
if 'data' in kwargs: if 'data' in kwargs:
raise ValueError('Client cannot provide both `json` and `data`') raise ValueError('Client cannot provide both `json` and `data`')
kwargs['data'] = json_dumps(kwargs['json']) kwargs['data'] = json_dumps(kwargs.pop('json'))
# Only set Content-Type when not explicitly provided # Only set Content-Type when not explicitly provided
if 'content_type' not in kwargs: if 'content_type' not in kwargs:

Loading…
Cancel
Save