diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-01-27 09:15:45 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-02-01 12:40:04 +0000 |
commit | 6da4c4d3bdceb99f20bc208dc4809d3d76ba9a72 (patch) | |
tree | ac6a489c63d1408a3cbde993331a5cdac23e3c11 /tests | |
parent | Rename resolve_state_groups -> resolve_state_groups_for_events (diff) | |
download | synapse-6da4c4d3bdceb99f20bc208dc4809d3d76ba9a72.tar.xz |
Factor out resolve_state_groups to a separate handler
We extract the storage-independent bits of the state group resolution out to a separate functiom, and stick it in a new handler, in preparation for its use from the storage layer.
Diffstat (limited to '')
-rw-r--r-- | tests/test_state.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_state.py b/tests/test_state.py index feb84f3d48..d16e1b3b8b 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -19,7 +19,7 @@ from twisted.internet import defer from synapse.events import FrozenEvent from synapse.api.auth import Auth from synapse.api.constants import EventTypes, Membership -from synapse.state import StateHandler +from synapse.state import StateHandler, StateResolutionHandler from .utils import MockClock @@ -148,11 +148,13 @@ class StateTestCase(unittest.TestCase): ) hs = Mock(spec_set=[ "get_datastore", "get_auth", "get_state_handler", "get_clock", + "get_state_resolution_handler", ]) hs.get_datastore.return_value = self.store hs.get_state_handler.return_value = None hs.get_clock.return_value = MockClock() hs.get_auth.return_value = Auth(hs) + hs.get_state_resolution_handler = lambda: StateResolutionHandler(hs) self.store.get_next_state_group.side_effect = Mock self.store.get_state_group_delta.return_value = (None, None) |