mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
api: Rewrite argument type test for clarity.
We refactor HostRequestMock so that it now proper populates the request body given the post data, assuming that the request is JSON encoded.
This commit is contained in:
committed by
Tim Abbott
parent
f4caf9dd79
commit
5a7b1065e5
@@ -358,7 +358,7 @@ class HostRequestMock(HttpRequest):
|
||||
self.META = meta_data
|
||||
self.path = path
|
||||
self.user = user_profile or AnonymousUser()
|
||||
self._body = b""
|
||||
self._body = orjson.dumps(post_data)
|
||||
self.content_type = ""
|
||||
|
||||
RequestNotes.set_notes(
|
||||
|
||||
Reference in New Issue
Block a user