summary refs log tree commit diff
path: root/tests/rest/client/v1/utils.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-10 16:37:49 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-10 16:37:49 +0000
commitdd486836f7b88cad7efee0323bb9691a054722f6 (patch)
tree0c7c3d0869dca471cf5c2f03594ef8533c24d5dc /tests/rest/client/v1/utils.py
parentMerge pull request #5465 from matrix-org/babolivier/fix_deactivation_bg_job (diff)
parentFix resetting password via a phone number (#21) (diff)
downloadsynapse-dd486836f7b88cad7efee0323bb9691a054722f6.tar.xz
Merge remote-tracking branch 'dinsic/dinsic' into dinsic-release-v1.1.0
Diffstat (limited to 'tests/rest/client/v1/utils.py')
-rw-r--r--tests/rest/client/v1/utils.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/rest/client/v1/utils.py b/tests/rest/client/v1/utils.py

index f7133fc12e..449a69183f 100644 --- a/tests/rest/client/v1/utils.py +++ b/tests/rest/client/v1/utils.py
@@ -128,13 +128,17 @@ class RestHelper(object): return channel.json_body - def send_state(self, room_id, event_type, body, tok, expect_code=200): - path = "/_matrix/client/r0/rooms/%s/state/%s" % (room_id, event_type) + def send_state(self, room_id, event_type, body, tok, expect_code=200, state_key=""): + path = "/_matrix/client/r0/rooms/%s/state/%s/%s" % ( + room_id, + event_type, + state_key, + ) if tok: path = path + "?access_token=%s" % tok request, channel = make_request( - self.hs.get_reactor(), "PUT", path, json.dumps(body).encode('utf8') + self.hs.get_reactor(), "PUT", path, json.dumps(body).encode("utf8") ) render(request, self.resource, self.hs.get_reactor())