diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-31 13:55:02 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-31 14:26:22 +0100 |
commit | c10cb581c6ce54e7dfa1f8a0f6449ee7f6d049d4 (patch) | |
tree | 18c7bb219894d6d75489ff33e92b3cba897aa872 /tests/replication | |
parent | Generate state group ids in state layer (diff) | |
download | synapse-c10cb581c6ce54e7dfa1f8a0f6449ee7f6d049d4.tar.xz |
Correctly handle the difference between prev and current state
Diffstat (limited to 'tests/replication')
-rw-r--r-- | tests/replication/slave/storage/test_events.py | 4 | ||||
-rw-r--r-- | tests/replication/test_resource.py | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py index 218cb24889..44e859b5d1 100644 --- a/tests/replication/slave/storage/test_events.py +++ b/tests/replication/slave/storage/test_events.py @@ -312,7 +312,9 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase): else: state_ids = None - context = EventContext(current_state_ids=state_ids) + 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 e70ac6f14d..b69832cc1b 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): |