mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-29 12:29:04 -05:00
Use parse_json_object_from_request to parse JSON out of request bodies
This commit is contained in:
parent
c081228439
commit
e9c1cabac2
11 changed files with 49 additions and 90 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue