Skip to content
Snippets Groups Projects
Commit 70c0d479 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

fix dict handling for make_request()

parent 9debe657
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment