mirror of https://github.com/zulip/zulip.git
test_classes: Add Content-Type header to empty DELETE/POST bodies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 0dd92d2116
)
This commit is contained in:
parent
f03cc51aca
commit
9fd5e9af4a
|
@ -478,7 +478,15 @@ Output:
|
|||
django_client = self.client # see WRAPPER_COMMENT
|
||||
self.set_http_headers(extra, skip_user_agent)
|
||||
result = django_client.delete(
|
||||
url, encoded, follow=follow, secure=secure, headers=headers, **extra
|
||||
url,
|
||||
encoded,
|
||||
follow=follow,
|
||||
secure=secure,
|
||||
headers={
|
||||
"Content-Type": "application/x-www-form-urlencoded", # https://code.djangoproject.com/ticket/33230
|
||||
**(headers or {}),
|
||||
},
|
||||
**extra,
|
||||
)
|
||||
self.validate_api_response_openapi(
|
||||
url,
|
||||
|
@ -551,7 +559,10 @@ Output:
|
|||
encoded,
|
||||
follow=follow,
|
||||
secure=secure,
|
||||
headers=headers,
|
||||
headers={
|
||||
"Content-Type": content_type, # https://code.djangoproject.com/ticket/33230
|
||||
**(headers or {}),
|
||||
},
|
||||
content_type=content_type,
|
||||
**extra,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue