summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-24 14:23:24 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-24 14:23:24 +0000
commit57d83e962d7d08f0178b2d352cabc5c4ebd77212 (patch)
tree32733c398a29956d72c8bb920bdf305ad23894e4 /tests
parentv1.11.1 (diff)
parentRead the room version from database when fetching events (#6874) (diff)
downloadsynapse-57d83e962d7d08f0178b2d352cabc5c4ebd77212.tar.xz
Read the room version from database when fetching events (#6874)
* commit '8ef8fb2c1':
  Read the room version from database when fetching events (#6874)
  Update debian changelog
Diffstat (limited to 'tests')
-rw-r--r--tests/replication/slave/storage/test_events.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py

index d31210fbe4..f0561b30e3 100644 --- a/tests/replication/slave/storage/test_events.py +++ b/tests/replication/slave/storage/test_events.py
@@ -15,6 +15,7 @@ import logging from canonicaljson import encode_canonical_json +from synapse.api.room_versions import RoomVersions from synapse.events import FrozenEvent, _EventInternalMetadata, make_event_from_dict from synapse.events.snapshot import EventContext from synapse.handlers.room import RoomEventSource @@ -58,6 +59,15 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase): self.unpatches = [patch__eq__(_EventInternalMetadata), patch__eq__(FrozenEvent)] return super(SlavedEventStoreTestCase, self).setUp() + def prepare(self, *args, **kwargs): + super().prepare(*args, **kwargs) + + self.get_success( + self.master_store.store_room( + ROOM_ID, USER_ID, is_public=False, room_version=RoomVersions.V1, + ) + ) + def tearDown(self): [unpatch() for unpatch in self.unpatches]