Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove _user_joined_room mock
Browse files Browse the repository at this point in the history
Turns out this was not necessary\!
  • Loading branch information
anoadragon453 committed Feb 15, 2022
1 parent 5de46ac commit edc28b0
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/rest/client/test_device_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit edc28b0

Please sign in to comment.