diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-06-09 07:05:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 07:05:32 -0400 |
commit | 11846dff8c667cbe6861ddc821ca7c53e3e2d890 (patch) | |
tree | 5671b8fd94e1cc09d6f0008ff237dd07ea9fd2f3 /tests/handlers | |
parent | Clean up the interface for injecting opentracing over HTTP (#10143) (diff) | |
download | synapse-11846dff8c667cbe6861ddc821ca7c53e3e2d890.tar.xz |
Limit the number of in-flight /keys/query requests from a single device. (#10144)
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_e2e_keys.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/handlers/test_e2e_keys.py b/tests/handlers/test_e2e_keys.py index 61a00130b8..e0a24824cc 100644 --- a/tests/handlers/test_e2e_keys.py +++ b/tests/handlers/test_e2e_keys.py @@ -257,7 +257,9 @@ class E2eKeysHandlerTestCase(unittest.HomeserverTestCase): self.get_success(self.handler.upload_signing_keys_for_user(local_user, keys2)) devices = self.get_success( - self.handler.query_devices({"device_keys": {local_user: []}}, 0, local_user) + self.handler.query_devices( + {"device_keys": {local_user: []}}, 0, local_user, "device123" + ) ) self.assertDictEqual(devices["master_keys"], {local_user: keys2["master_key"]}) @@ -357,7 +359,9 @@ class E2eKeysHandlerTestCase(unittest.HomeserverTestCase): device_key_1["signatures"][local_user]["ed25519:abc"] = "base64+signature" device_key_2["signatures"][local_user]["ed25519:def"] = "base64+signature" devices = self.get_success( - self.handler.query_devices({"device_keys": {local_user: []}}, 0, local_user) + self.handler.query_devices( + {"device_keys": {local_user: []}}, 0, local_user, "device123" + ) ) del devices["device_keys"][local_user]["abc"]["unsigned"] del devices["device_keys"][local_user]["def"]["unsigned"] @@ -591,7 +595,10 @@ class E2eKeysHandlerTestCase(unittest.HomeserverTestCase): # fetch the signed keys/devices and make sure that the signatures are there ret = self.get_success( self.handler.query_devices( - {"device_keys": {local_user: [], other_user: []}}, 0, local_user + {"device_keys": {local_user: [], other_user: []}}, + 0, + local_user, + "device123", ) ) |