From 60a291a58d7419d37136e52338fb61747facd1d0 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 10 Dec 2021 15:39:12 +0000 Subject: [PATCH] Update reset device list mock before starting tests --- tests/handlers/test_appservice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/handlers/test_appservice.py b/tests/handlers/test_appservice.py index 76178f114cee..67c7e5e00bbb 100644 --- a/tests/handlers/test_appservice.py +++ b/tests/handlers/test_appservice.py @@ -373,6 +373,9 @@ def prepare(self, reactor, clock, hs): "exclusive_as_user", "password", self.exclusive_as_user_device_id ) + # Ensure that the mock is reset after creating devices (and thus updating device lists) + self.send_mock.reset_mock() + @unittest.override_config( {"experimental_features": {"msc2409_to_device_messages_enabled": True}} )