From 3426c60480b6cf3492c63e7cb5d115ae2d3d8930 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 10 Aug 2010 19:09:22 -0400 Subject: Implement HTTP PUT (good path) for changing a list's configuration. --- src/mailman/tests/test_documentation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mailman/tests/test_documentation.py') 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 -- cgit v1.2.3-70-g09d2