diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-08-26 16:07:05 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-08-26 16:07:05 +0100 |
commit | 4b63b06cad3e72e3d3dee66d3d6c7801e4a7abaf (patch) | |
tree | 37b368d6039d986d70f153fb69d6345d1019d64a /tests/utils.py | |
parent | fix a few pyflakes errors (diff) | |
parent | Fix pyflakes errors (diff) | |
download | synapse-4b63b06cad3e72e3d3dee66d3d6c7801e4a7abaf.tar.xz |
Merge branch 'develop' into storage_transactions
Conflicts: synapse/api/auth.py synapse/handlers/room.py synapse/storage/__init__.py
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/utils.py b/tests/utils.py index f10bb8960f..aa9608a1ed 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -190,7 +190,7 @@ class MemoryDataStore(object): def persist_event(self, event): if event.type == RoomMemberEvent.TYPE: room_id = event.room_id - user = event.target_user_id + user = event.state_key membership = event.membership self.members.setdefault(room_id, {})[user] = event @@ -203,7 +203,9 @@ class MemoryDataStore(object): def get_current_state(self, room_id, event_type=None, state_key=""): if event_type: key = (room_id, event_type, state_key) - return self.current_state.get(key) + if self.current_state.get(key): + return [self.current_state.get(key)] + return None else: return [ e for e in self.current_state @@ -221,7 +223,7 @@ class MemoryDataStore(object): def _format_call(args, kwargs): return ", ".join( - ["%r" % (a) for a in args] + + ["%r" % (a) for a in args] + ["%s=%r" % (k, v) for k, v in kwargs.items()] ) |