mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 19:52:03 +00:00
fix dict handling for make_request()
This commit is contained in:
parent
9debe657a3
commit
70c0d47989
@ -193,6 +193,8 @@ def make_request(
|
||||
if not path.startswith(b"/"):
|
||||
path = b"/" + path
|
||||
|
||||
if isinstance(content, dict):
|
||||
content = json.dumps(content).encode("utf8")
|
||||
if isinstance(content, str):
|
||||
content = content.encode("utf8")
|
||||
|
||||
|
@ -429,9 +429,6 @@ class HomeserverTestCase(TestCase):
|
||||
Returns:
|
||||
Tuple[synapse.http.site.SynapseRequest, channel]
|
||||
"""
|
||||
if isinstance(content, dict):
|
||||
content = json.dumps(content).encode("utf8")
|
||||
|
||||
return make_request(
|
||||
self.reactor,
|
||||
self.site,
|
||||
|
Loading…
Reference in New Issue
Block a user