diff options
author | Erik Johnston <erik@matrix.org> | 2014-11-19 18:03:57 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-11-19 18:03:57 +0000 |
commit | 19977b465913c3cb263d88884e16f9dc13f2a05e (patch) | |
tree | 6015e4155502d34fd8aa35fc32094d8c29981a0a /tests/storage/test_roommember.py | |
parent | Merge branch 'release-v0.4.2' of github.com:matrix-org/synapse (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.5.0 (diff) | |
download | synapse-19977b465913c3cb263d88884e16f9dc13f2a05e.tar.xz |
Merge branch 'release-v0.5.0' of github.com:matrix-org/synapse v0.5.0
Diffstat (limited to 'tests/storage/test_roommember.py')
-rw-r--r-- | tests/storage/test_roommember.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/storage/test_roommember.py b/tests/storage/test_roommember.py index eae278ee8d..8614e5ca9d 100644 --- a/tests/storage/test_roommember.py +++ b/tests/storage/test_roommember.py @@ -51,16 +51,24 @@ 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 = {} + event.prev_state = {} + event.auth_events = {} + 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 |