summaryrefslogtreecommitdiff
path: root/src/mailman/tests/test_documentation.py
diff options
context:
space:
mode:
authorBarry Warsaw2010-08-10 19:09:22 -0400
committerBarry Warsaw2010-08-10 19:09:22 -0400
commit3426c60480b6cf3492c63e7cb5d115ae2d3d8930 (patch)
treefcb04716309ad73bf524a081613ae35ba9f0d929 /src/mailman/tests/test_documentation.py
parent02ac6590baaad126be1f6154794bce5ccecaaf99 (diff)
downloadmailman-3426c60480b6cf3492c63e7cb5d115ae2d3d8930.tar.gz
mailman-3426c60480b6cf3492c63e7cb5d115ae2d3d8930.tar.zst
mailman-3426c60480b6cf3492c63e7cb5d115ae2d3d8930.zip
Diffstat (limited to 'src/mailman/tests/test_documentation.py')
-rw-r--r--src/mailman/tests/test_documentation.py4
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