summary refs log tree commit diff
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-11-06 20:47:14 -0500
committerHubert Chathi <hubert@uhoreg.ca>2019-11-06 20:47:14 -0500
commit8721067448b34cce09058326c20adef0d1d00f3b (patch)
treea02fe89b4d064d50ff9f47ca7531f84431328cb2
parentupdate the changelog too (diff)
downloadsynapse-8721067448b34cce09058326c20adef0d1d00f3b.tar.xz
fix unit test to use new API
and improve docstring
-rw-r--r--synapse/storage/data_stores/main/e2e_room_keys.py3
-rw-r--r--tests/storage/test_e2e_room_keys.py8
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)]
             )
         )