diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-10-04 12:21:33 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-10-04 12:21:33 +0100 |
commit | c49ba3677c635ff2c0b19b9005967df619b4c748 (patch) | |
tree | 067adbebe2421152a404d2a5a8a7cbb08ee418cd /tests | |
parent | Typo (diff) | |
download | synapse-c49ba3677c635ff2c0b19b9005967df619b4c748.tar.xz |
Fixup tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/handlers/test_federation.py | 6 | ||||
-rw-r--r-- | tests/rest/client/v1/utils.py | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/handlers/test_federation.py b/tests/handlers/test_federation.py index d56220f403..b1ae15a2bd 100644 --- a/tests/handlers/test_federation.py +++ b/tests/handlers/test_federation.py @@ -50,6 +50,7 @@ class FederationTestCase(unittest.HomeserverTestCase): ) d = self.handler.on_exchange_third_party_invite_request( + origin="example.com", room_id=room_id, event_dict={ "type": EventTypes.Member, @@ -65,7 +66,10 @@ class FederationTestCase(unittest.HomeserverTestCase): "token": invite_token, "signatures": { "magic.forest": { - "ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg" + "ed25519:3": ( + "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIs" + "NffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg" + ) } }, }, 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()) |