summaryrefslogtreecommitdiff
path: root/src/mailman/testing/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2014-01-06 22:43:59 -0500
committerBarry Warsaw2014-01-06 22:43:59 -0500
commitd5aac006b6eed59999029605b037c6202fcf395e (patch)
tree799a41026ea1e93c91b3130b734b72c9c8890d0c /src/mailman/testing/helpers.py
parent2fa21e92d57f05488bad732a4da3fb5131ee1ca1 (diff)
downloadmailman-d5aac006b6eed59999029605b037c6202fcf395e.tar.gz
mailman-d5aac006b6eed59999029605b037c6202fcf395e.tar.zst
mailman-d5aac006b6eed59999029605b037c6202fcf395e.zip
Diffstat (limited to 'src/mailman/testing/helpers.py')
-rw-r--r--src/mailman/testing/helpers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py
index 24a7692ae..1ef9e964e 100644
--- a/src/mailman/testing/helpers.py
+++ b/src/mailman/testing/helpers.py
@@ -327,6 +327,8 @@ def call_api(url, data=None, method=None, username=None, password=None):
else:
method = 'POST'
method = method.upper()
+ if method in ('POST', 'PUT', 'PATCH') and data is None:
+ data = urlencode({}, doseq=True)
basic_auth = '{0}:{1}'.format(
(config.webservice.admin_user if username is None else username),
(config.webservice.admin_pass if password is None else password))