summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-02-12 18:47:30 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2021-02-12 20:11:37 +0000
commit72c1e61f41481ee6f4201670cd0e21a51a7b613d (patch)
tree580d7c52db0e8569be702ba81a79ed7adf08ce67 /tests
parentSpeed up get_users_who_share_room_with_user with a more efficient query (diff)
downloadsynapse-72c1e61f41481ee6f4201670cd0e21a51a7b613d.tar.xz
Remove duplicate where we filter ourselves out of destinations to send presence to
send_presence_to_destinations will already filter out the current server from the
given list. No need to do it again beforehand.
Diffstat (limited to 'tests')
-rw-r--r--tests/handlers/test_presence.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py
index 0794b32c9c..9d056ba58d 100644
--- a/tests/handlers/test_presence.py
+++ b/tests/handlers/test_presence.py
@@ -585,7 +585,11 @@ class PresenceJoinTestCase(unittest.HomeserverTestCase):
         )
         self.assertEqual(expected_state.state, PresenceState.ONLINE)
         self.federation_sender.send_presence_to_destinations.assert_called_once_with(
-            destinations={"server2", "server3"}, states=[expected_state]
+            # server1 is included here as it appears when getting the current hosts for
+            # the room. send_presence_to_destinations will remove the host server before
+            # sending out presence.
+            destinations=frozenset({"server1", "server2", "server3"}),
+            states=[expected_state],
         )
 
     def _add_new_user(self, room_id, user_id):