From 3791b75000f9787806dbdce3e6e216da1ac07388 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 5 Nov 2014 13:48:36 +0000 Subject: Fix a couple more storage tests --- tests/storage/test_roommember.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'tests/storage/test_roommember.py') 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 -- cgit 1.4.1 From e2cebe26e8ba1d7c2a39594ea1f4be0dee73ace4 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 10 Nov 2014 15:24:15 +0000 Subject: Fix room_member storage test --- tests/storage/test_roommember.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/storage/test_roommember.py') diff --git a/tests/storage/test_roommember.py b/tests/storage/test_roommember.py index 9e2b2e31c8..8614e5ca9d 100644 --- a/tests/storage/test_roommember.py +++ b/tests/storage/test_roommember.py @@ -64,6 +64,8 @@ class RoomMemberStoreTestCase(unittest.TestCase): event.state_events = None event.hashes = {} + event.prev_state = {} + event.auth_events = {} yield self.store.persist_event( event -- cgit 1.4.1