summary refs log tree commit diff
path: root/tests/handlers/test_presencelike.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-17 15:05:09 +0100
committerErik Johnston <erik@matrix.org>2014-09-17 15:05:14 +0100
commitb6818fd4d2108543ce86b5d8bf540e74a89cf27e (patch)
tree3b62ea9a09f0cfd2afe4bb238479bcd554af47da /tests/handlers/test_presencelike.py
parentBF: edit the actual room name not the displayed room name (which has been com... (diff)
downloadsynapse-b6818fd4d2108543ce86b5d8bf540e74a89cf27e.tar.xz
SYN-40: When a user updates their displayname or avatar update all their join events for all the rooms they are currently in.
Diffstat (limited to 'tests/handlers/test_presencelike.py')
-rw-r--r--tests/handlers/test_presencelike.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/handlers/test_presencelike.py b/tests/handlers/test_presencelike.py
index 72c55b3667..047752ad68 100644
--- a/tests/handlers/test_presencelike.py
+++ b/tests/handlers/test_presencelike.py
@@ -65,6 +65,8 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase):
                     "is_presence_visible",
 
                     "set_profile_displayname",
+
+                    "get_rooms_for_user_where_membership_is",
                 ]),
                 handlers=None,
                 resource_for_federation=Mock(),
@@ -132,6 +134,10 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase):
         # Remote user
         self.u_potato = hs.parse_userid("@potato:remote")
 
+        self.mock_get_joined = (
+            self.datastore.get_rooms_for_user_where_membership_is
+        )
+
     @defer.inlineCallbacks
     def test_set_my_state(self):
         self.presence_list = [
@@ -152,6 +158,11 @@ class PresenceProfilelikeDataTestCase(unittest.TestCase):
 
     @defer.inlineCallbacks
     def test_push_local(self):
+        def get_joined(*args):
+            return defer.succeed([])
+
+        self.mock_get_joined.side_effect = get_joined
+
         self.presence_list = [
             {"observed_user_id": "@banana:test"},
             {"observed_user_id": "@clementine:test"},