mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add support for JSON request in HTTP test class
"urllib.parse.urlencode()" brokes JSON request's data. Fixes: https://pagure.io/freeipa/issue/7559 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
b8607e24d6
commit
0dace623ab
@ -41,6 +41,7 @@ class Unauthorized_HTTP_test(object):
|
||||
:param key When not None, overrides default app_uri
|
||||
"""
|
||||
if params is not None:
|
||||
if self.content_type == 'application/x-www-form-urlencoded':
|
||||
# urlencode *can* take two arguments
|
||||
# pylint: disable=too-many-function-args
|
||||
params = urllib.parse.urlencode(params, True)
|
||||
|
Loading…
Reference in New Issue
Block a user