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_roommember.py | |
parent | Remove stale tests (diff) | |
download | synapse-3791b75000f9787806dbdce3e6e216da1ac07388.tar.xz |
Fix a couple more storage tests
Diffstat (limited to 'tests/storage/test_roommember.py')
-rw-r--r-- | tests/storage/test_roommember.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/storage/test_roommember.py b/tests/storage/test_roommember.py index eae278ee8d..9e2b2e31c8 100644 --- a/tests/storage/test_roommember.py +++ b/tests/storage/test_roommember.py @@ -51,16 +51,22 @@ class RoomMemberStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def inject_room_member(self, room, user, membership): # Have to create a join event using the eventfactory + event = self.event_factory.create_event( + etype=RoomMemberEvent.TYPE, + user_id=user.to_string(), + state_key=user.to_string(), + room_id=room.to_string(), + membership=membership, + content={"membership": membership}, + depth=1, + prev_events=[], + ) + + event.state_events = None + event.hashes = {} + yield self.store.persist_event( - self.event_factory.create_event( - etype=RoomMemberEvent.TYPE, - user_id=user.to_string(), - state_key=user.to_string(), - room_id=room.to_string(), - membership=membership, - content={"membership": membership}, - depth=1, - ) + event ) @defer.inlineCallbacks |