From 72c1e61f41481ee6f4201670cd0e21a51a7b613d Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 12 Feb 2021 18:47:30 +0000 Subject: 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. --- tests/handlers/test_presence.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') 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): -- cgit 1.5.1