diff options
author | Erik Johnston <erikj@jki.re> | 2018-08-22 10:04:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-22 10:04:55 +0100 |
commit | 3bf8bab8f9d9bbdf225361adc66a97fdf4ae3fcd (patch) | |
tree | e43a5df4670f4da60604e5cc03e507db4efd99ad /tests/test_state.py | |
parent | Merge pull request #3735 from matrix-org/travis/federation-spelling (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/refactor_s... (diff) | |
download | synapse-3bf8bab8f9d9bbdf225361adc66a97fdf4ae3fcd.tar.xz |
Merge pull request #3673 from matrix-org/erikj/refactor_state_handler
Refactor state module to support multiple room versions
Diffstat (limited to 'tests/test_state.py')
-rw-r--r-- | tests/test_state.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_state.py b/tests/test_state.py index 96fdb8636c..452a123c3a 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -18,7 +18,7 @@ from mock import Mock from twisted.internet import defer from synapse.api.auth import Auth -from synapse.api.constants import EventTypes, Membership +from synapse.api.constants import EventTypes, Membership, RoomVersions from synapse.events import FrozenEvent from synapse.state import StateHandler, StateResolutionHandler @@ -117,6 +117,9 @@ class StateGroupStore(object): def register_event_id_state_group(self, event_id, state_group): self._event_to_state_group[event_id] = state_group + def get_room_version(self, room_id): + return RoomVersions.V1 + class DictObj(dict): def __init__(self, **kwargs): @@ -176,7 +179,9 @@ class StateTestCase(unittest.TestCase): def test_branch_no_conflict(self): graph = Graph( nodes={ - "START": DictObj(type=EventTypes.Create, state_key="", depth=1), + "START": DictObj( + type=EventTypes.Create, state_key="", content={}, depth=1, + ), "A": DictObj(type=EventTypes.Message, depth=2), "B": DictObj(type=EventTypes.Message, depth=3), "C": DictObj(type=EventTypes.Name, state_key="", depth=3), |