From 8721067448b34cce09058326c20adef0d1d00f3b Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Wed, 6 Nov 2019 20:47:14 -0500 Subject: fix unit test to use new API and improve docstring --- synapse/storage/data_stores/main/e2e_room_keys.py | 3 ++- 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)] ) ) -- cgit 1.4.1