diff options
Diffstat (limited to 'src/mailman/tests/test_documentation.py')
| -rw-r--r-- | src/mailman/tests/test_documentation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py index b8e98d162..98d381208 100644 --- a/src/mailman/tests/test_documentation.py +++ b/src/mailman/tests/test_documentation.py @@ -119,15 +119,15 @@ def dump_json(url, data=None, method=None): :param method: Alternative HTTP method to use. :type method: str """ + headers = {} if data is not None: data = urlencode(data) - headers = {} + headers['Content-Type'] = 'application/x-www-form-urlencoded' if method is None: if data is None: method = 'GET' else: method = 'POST' - headers['Content-Type'] = 'application/x-www-form-urlencoded' method = method.upper() response, content = Http().request(url, method, data, headers) # If we did not get a 2xx status code, make this look like a urllib2 |
