diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-01 16:14:07 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-01 16:15:45 +0100 |
commit | 59d3955db185de7c07e04ccd7d0479a6b44e1096 (patch) | |
tree | 8482d03d1854e5d621f0e36fe4a54f3cfa82ab14 /tests/utils.py | |
parent | Perform room unit tests with 'local' users actually in the right domain ;) (diff) | |
download | synapse-59d3955db185de7c07e04ccd7d0479a6b44e1096.tar.xz |
Have MemoryDataStore's get_rooms_for_user_where_membership_is() return room membership event objects, as per interface contract
Diffstat (limited to '')
-rw-r--r-- | tests/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py index 37b759febc..ea7d6893c6 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -188,8 +188,9 @@ class MemoryDataStore(object): def get_rooms_for_user_where_membership_is(self, user_id, membership_list): return [ - r for r in self.members - if self.members[r].get(user_id).membership in membership_list + self.members[r].get(user_id) for r in self.members + if user_id in self.members[r] and + self.members[r][user_id].membership in membership_list ] def get_room_events_stream(self, user_id=None, from_key=None, to_key=None, |