From edc28b044a3b892fe03d2df256dad8ca1b6316a7 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 15 Feb 2022 10:32:50 +0000 Subject: [PATCH] Remove _user_joined_room mock Turns out this was not necessary\! --- tests/rest/client/test_device_lists.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tests/rest/client/test_device_lists.py b/tests/rest/client/test_device_lists.py index 8326802db57e..16070cf0270f 100644 --- a/tests/rest/client/test_device_lists.py +++ b/tests/rest/client/test_device_lists.py @@ -11,8 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from unittest.mock import Mock - from synapse.rest import admin, devices, room, sync from synapse.rest.client import account, login, register @@ -52,16 +50,6 @@ def test_receiving_local_device_list_changes(self): ) self.assertIsNotNone(new_room_id) - # Pretend that Bob joined this room on a previous homeserver startup. - # - # There is a quirk; if Bob has joined the room since the last homeserver - # restart, then an additional mechanism is employed to ensure Bob will start - # receiving device list updates for that room. - # In order to test the case where Bob has previously been joined to the room, - # instead of restarting Synapse, we can just stub out the notifier machinery - # that is triggered when a user joins a room. - self.hs.get_notifier()._user_joined_room = Mock(return_value=None) - # Have Bob join the room self.helper.invite( new_room_id, alice_user_id, bob_user_id, tok=alice_access_token