summary refs log tree commit diff
path: root/tests/test_utils/event_injection.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_utils/event_injection.py')
-rw-r--r--tests/test_utils/event_injection.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_utils/event_injection.py b/tests/test_utils/event_injection.py
index e9ec9e085b..c654e36ee4 100644
--- a/tests/test_utils/event_injection.py
+++ b/tests/test_utils/event_injection.py
@@ -85,7 +85,9 @@ async def create_event(
     **kwargs,
 ) -> Tuple[EventBase, EventContext]:
     if room_version is None:
-        room_version = await hs.get_datastore().get_room_version_id(kwargs["room_id"])
+        room_version = await hs.get_datastores().main.get_room_version_id(
+            kwargs["room_id"]
+        )
 
     builder = hs.get_event_builder_factory().for_room_version(
         KNOWN_ROOM_VERSIONS[room_version], kwargs