diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-11-06 20:47:14 -0500 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-11-06 20:47:14 -0500 |
commit | 8721067448b34cce09058326c20adef0d1d00f3b (patch) | |
tree | a02fe89b4d064d50ff9f47ca7531f84431328cb2 | |
parent | update the changelog too (diff) | |
download | synapse-8721067448b34cce09058326c20adef0d1d00f3b.tar.xz |
fix unit test to use new API
and improve docstring
-rw-r--r-- | synapse/storage/data_stores/main/e2e_room_keys.py | 3 | ||||
-rw-r--r-- | tests/storage/test_e2e_room_keys.py | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/synapse/storage/data_stores/main/e2e_room_keys.py b/synapse/storage/data_stores/main/e2e_room_keys.py index 2c843c6fbe..78a10db072 100644 --- a/synapse/storage/data_stores/main/e2e_room_keys.py +++ b/synapse/storage/data_stores/main/e2e_room_keys.py @@ -62,7 +62,8 @@ class EndToEndRoomKeyStore(SQLBaseStore): Args: user_id(str): the user whose backup we're adding to version(str): the version ID of the backup for the set of keys we're adding to - room_keys(iterable[dict]): the keys to add + room_keys(iterable[(str, str, dict)]): the keys to add, in the form + (roomID, sessionID, keyData) """ values = [] diff --git a/tests/storage/test_e2e_room_keys.py b/tests/storage/test_e2e_room_keys.py index d128fde441..35dafbb904 100644 --- a/tests/storage/test_e2e_room_keys.py +++ b/tests/storage/test_e2e_room_keys.py @@ -39,8 +39,8 @@ class E2eRoomKeysHandlerTestCase(unittest.HomeserverTestCase): ) self.get_success( - self.store.set_e2e_room_key( - "user_id", version1, "room", "session", room_key + self.store.add_e2e_room_keys( + "user_id", version1, [("room", "session", room_key)] ) ) @@ -51,8 +51,8 @@ class E2eRoomKeysHandlerTestCase(unittest.HomeserverTestCase): ) self.get_success( - self.store.set_e2e_room_key( - "user_id", version2, "room", "session", room_key + self.store.add_e2e_room_keys( + "user_id", version2, [("room", "session", room_key)] ) ) |