summary refs log tree commit diff
path: root/tests/rest/client
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-03-11 16:41:03 +0000
committerMark Haines <mark.haines@matrix.org>2016-03-11 16:41:03 +0000
commite9c1cabac26cf8e28152ebdb3caf29d4457eea0e (patch)
tree792ef6135a1a1a52f39a83a8e2ff6e2e28e949c7 /tests/rest/client
parentFix SQL statement (diff)
downloadsynapse-e9c1cabac26cf8e28152ebdb3caf29d4457eea0e.tar.xz
Use parse_json_object_from_request to parse JSON out of request bodies
Diffstat (limited to 'tests/rest/client')
-rw-r--r--tests/rest/client/v1/test_profile.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/rest/client/v1/test_profile.py b/tests/rest/client/v1/test_profile.py
index 1d210f9bf8..af02fce8fb 100644
--- a/tests/rest/client/v1/test_profile.py
+++ b/tests/rest/client/v1/test_profile.py
@@ -95,7 +95,8 @@ class ProfileTestCase(unittest.TestCase):
         mocked_set.side_effect = AuthError(400, "message")
 
         (code, response) = yield self.mock_resource.trigger(
-            "PUT", "/profile/%s/displayname" % ("@4567:test"), '"Frank Jr."'
+            "PUT", "/profile/%s/displayname" % ("@4567:test"),
+            '{"displayname": "Frank Jr."}'
         )
 
         self.assertTrue(
@@ -121,7 +122,8 @@ class ProfileTestCase(unittest.TestCase):
         mocked_set.side_effect = SynapseError(400, "message")
 
         (code, response) = yield self.mock_resource.trigger(
-            "PUT", "/profile/%s/displayname" % ("@opaque:elsewhere"), None
+            "PUT", "/profile/%s/displayname" % ("@opaque:elsewhere"),
+            '{"displayname":"bob"}'
         )
 
         self.assertTrue(