summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2020-01-31 10:56:42 +0000
committerGitHub <noreply@github.com>2020-01-31 10:56:42 +0000
commit160522e32cb92b5fb4f0bcd8e3c53d0a4d04ad3f (patch)
treef49255e22a2840ac954f911e7b263a1e709ce9c4 /tests
parentFix bug with getting missing auth event during join 500'ed (#6810) (diff)
parentnewsfile (diff)
downloadsynapse-160522e32cb92b5fb4f0bcd8e3c53d0a4d04ad3f.tar.xz
Merge pull request #6820 from matrix-org/rav/get_room_version_id
Make `get_room_version` return a RoomVersion object
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_presence.py2
-rw-r--r--tests/test_state.py2
-rw-r--r--tests/unittest.py4
3 files changed, 5 insertions, 3 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py
index d4293b4312..e92e090c3c 100644
--- a/tests/handlers/test_presence.py
+++ b/tests/handlers/test_presence.py
@@ -588,7 +588,7 @@ class PresenceJoinTestCase(unittest.HomeserverTestCase):
 
         hostname = get_domain_from_id(user_id)
 
-        room_version = self.get_success(self.store.get_room_version(room_id))
+        room_version = self.get_success(self.store.get_room_version_id(room_id))
 
         builder = EventBuilder(
             state=self.state,
diff --git a/tests/test_state.py b/tests/test_state.py
index e0aae06be4..1e4449fa1c 100644
--- a/tests/test_state.py
+++ b/tests/test_state.py
@@ -119,7 +119,7 @@ class StateGroupStore(object):
     def register_event_id_state_group(self, event_id, state_group):
         self._event_to_state_group[event_id] = state_group
 
-    def get_room_version(self, room_id):
+    def get_room_version_id(self, room_id):
         return RoomVersions.V1.identifier
 
 
diff --git a/tests/unittest.py b/tests/unittest.py
index b56e249386..98bf27d39c 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -589,7 +589,9 @@ class HomeserverTestCase(TestCase):
         event_builder_factory = self.hs.get_event_builder_factory()
         event_creation_handler = self.hs.get_event_creation_handler()
 
-        room_version = self.get_success(self.hs.get_datastore().get_room_version(room))
+        room_version = self.get_success(
+            self.hs.get_datastore().get_room_version_id(room)
+        )
 
         builder = event_builder_factory.for_room_version(
             KNOWN_ROOM_VERSIONS[room_version],