diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-08-18 09:22:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 09:22:07 -0400 |
commit | bec01c075829730cf467572e2fcf93e15372b0e9 (patch) | |
tree | f644f343dec9e9d3c71c266e1afd37dc2872a8b2 /tests/replication/slave/storage | |
parent | Display an error page during failure of fallback UIA. (#10561) (diff) | |
download | synapse-bec01c075829730cf467572e2fcf93e15372b0e9.tar.xz |
Convert room member storage tuples to attrs. (#10629)
Instead of using namedtuples. This helps with asserting type hints and code completion.
Diffstat (limited to 'tests/replication/slave/storage')
-rw-r--r-- | tests/replication/slave/storage/test_events.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py index db80a0bdbd..8d1b0606c4 100644 --- a/tests/replication/slave/storage/test_events.py +++ b/tests/replication/slave/storage/test_events.py @@ -20,7 +20,7 @@ from synapse.api.room_versions import RoomVersions from synapse.events import FrozenEvent, _EventInternalMetadata, make_event_from_dict from synapse.handlers.room import RoomEventSource from synapse.replication.slave.storage.events import SlavedEventStore -from synapse.storage.roommember import RoomsForUser +from synapse.storage.roommember import GetRoomsForUserWithStreamOrdering, RoomsForUser from synapse.types import PersistedEventPosition from tests.server import FakeTransport @@ -216,7 +216,7 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase): self.check( "get_rooms_for_user_with_stream_ordering", (USER_ID_2,), - {(ROOM_ID, expected_pos)}, + {GetRoomsForUserWithStreamOrdering(ROOM_ID, expected_pos)}, ) def test_get_rooms_for_user_with_stream_ordering_with_multi_event_persist(self): @@ -305,7 +305,10 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase): expected_pos = PersistedEventPosition( "master", j2.internal_metadata.stream_ordering ) - self.assertEqual(joined_rooms, {(ROOM_ID, expected_pos)}) + self.assertEqual( + joined_rooms, + {GetRoomsForUserWithStreamOrdering(ROOM_ID, expected_pos)}, + ) event_id = 0 |