diff options
author | Shay <hillerys@element.io> | 2022-05-18 10:15:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 10:15:52 -0700 |
commit | 19d79b6ebe3070ad7352f24549fbafb9dee44b75 (patch) | |
tree | 130edc5d9b8b8249b21e47dbd842a053390b4d93 /tests/test_state.py | |
parent | Add documentation for cancellation of request processing (#12761) (diff) | |
download | synapse-19d79b6ebe3070ad7352f24549fbafb9dee44b75.tar.xz |
Refactor `resolve_state_groups_for_events` to not pull out full state when no state resolution happens. (#12775)
Diffstat (limited to 'tests/test_state.py')
-rw-r--r-- | tests/test_state.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_state.py b/tests/test_state.py index 651ec1c7d4..74a8ce6096 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -129,6 +129,19 @@ class _DummyStore: async def get_room_version_id(self, room_id): return RoomVersions.V1.identifier + async def get_state_group_for_events(self, event_ids): + res = {} + for event in event_ids: + res[event] = self._event_to_state_group[event] + return res + + async def get_state_for_groups(self, groups): + res = {} + for group in groups: + state = self._group_to_state[group] + res[group] = state + return res + class DictObj(dict): def __init__(self, **kwargs): |