diff options
author | Erik Johnston <erik@matrix.org> | 2014-11-05 13:48:36 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-11-05 13:48:36 +0000 |
commit | 3791b75000f9787806dbdce3e6e216da1ac07388 (patch) | |
tree | 3ddd8c75ba2ef48b062716077903f3e65f40ef42 /tests/storage/test_stream.py | |
parent | Remove stale tests (diff) | |
download | synapse-3791b75000f9787806dbdce3e6e216da1ac07388.tar.xz |
Fix a couple more storage tests
Diffstat (limited to 'tests/storage/test_stream.py')
-rw-r--r-- | tests/storage/test_stream.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/storage/test_stream.py b/tests/storage/test_stream.py index ab30e6ea25..b034fd8f16 100644 --- a/tests/storage/test_stream.py +++ b/tests/storage/test_stream.py @@ -59,8 +59,12 @@ class StreamStoreTestCase(unittest.TestCase): membership=membership, content={"membership": membership}, depth=self.depth, + prev_events=[], ) + event.state_events = None + event.hashes = {} + if prev_state: event.prev_state = prev_state @@ -75,15 +79,21 @@ class StreamStoreTestCase(unittest.TestCase): def inject_message(self, room, user, body): self.depth += 1 + event = self.event_factory.create_event( + etype=MessageEvent.TYPE, + user_id=user.to_string(), + room_id=room.to_string(), + content={"body": body, "msgtype": u"message"}, + depth=self.depth, + prev_events=[], + ) + + event.state_events = None + event.hashes = {} + # Have to create a join event using the eventfactory yield self.store.persist_event( - self.event_factory.create_event( - etype=MessageEvent.TYPE, - user_id=user.to_string(), - room_id=room.to_string(), - content={"body": body, "msgtype": u"message"}, - depth=self.depth, - ) + event ) @defer.inlineCallbacks |