diff options
author | Erik Johnston <erikj@matrix.org> | 2016-09-08 15:33:07 +0100 |
---|---|---|
committer | Erik Johnston <erikj@matrix.org> | 2016-09-08 15:33:07 +0100 |
commit | 51bd72a0d0c1d409ba8603129ad528726831a929 (patch) | |
tree | 3d1fe71fc6a53ea65981f814facd80d79d99bf68 /tests/replication | |
parent | c1c15ad12f8bda0d65778bd03543ad1f14a1cfc2 (diff) |
Imported Upstream version 0.17.2
Diffstat (limited to 'tests/replication')
-rw-r--r-- | tests/replication/slave/storage/test_events.py | 11 | ||||
-rw-r--r-- | tests/replication/test_resource.py | 10 |
2 files changed, 12 insertions, 9 deletions
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py index f33e6f60..44e859b5 100644 --- a/tests/replication/slave/storage/test_events.py +++ b/tests/replication/slave/storage/test_events.py @@ -305,7 +305,16 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase): self.event_id += 1 - context = EventContext(current_state=state) + if state is not None: + state_ids = { + key: e.event_id for key, e in state.items() + } + else: + state_ids = None + + context = EventContext() + context.current_state_ids = state_ids + context.prev_state_ids = state_ids context.push_actions = push_actions ordering = None diff --git a/tests/replication/test_resource.py b/tests/replication/test_resource.py index e70ac6f1..b69832cc 100644 --- a/tests/replication/test_resource.py +++ b/tests/replication/test_resource.py @@ -60,8 +60,8 @@ class ReplicationResourceCase(unittest.TestCase): self.assertEquals(body, {}) @defer.inlineCallbacks - def test_events_and_state(self): - get = self.get(events="-1", state="-1", timeout="0") + def test_events(self): + get = self.get(events="-1", timeout="0") yield self.hs.get_handlers().room_creation_handler.create_room( synapse.types.create_requester(self.user), {} ) @@ -70,12 +70,6 @@ class ReplicationResourceCase(unittest.TestCase): self.assertEquals(body["events"]["field_names"], [ "position", "internal", "json", "state_group" ]) - self.assertEquals(body["state_groups"]["field_names"], [ - "position", "room_id", "event_id" - ]) - self.assertEquals(body["state_group_state"]["field_names"], [ - "position", "type", "state_key", "event_id" - ]) @defer.inlineCallbacks def test_presence(self): |