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

Commit

Permalink
WIP: Adapting test to new API with metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoric committed May 18, 2022
1 parent 9116e41 commit 9f8f6a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/rest/client/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ async def user_may_join_room(
) -> bool:
return False

join_mock = Mock(side_effect=user_may_join_room)
join_mock = Mock(side_effect=user_may_join_room, spec=lambda *x: None)
self.hs.get_spam_checker()._user_may_join_room_callbacks.append(join_mock)

channel = self.make_request(
Expand All @@ -713,7 +713,7 @@ async def user_may_join_room(
) -> Decision:
return Code.FORBIDDEN

join_mock = Mock(side_effect=user_may_join_room)
join_mock = Mock(side_effect=user_may_join_room, spec=lambda *x: None)
self.hs.get_spam_checker()._user_may_join_room_callbacks.append(join_mock)

channel = self.make_request(
Expand Down Expand Up @@ -1007,7 +1007,7 @@ async def user_may_join_room(
) -> Decision:
return return_value

callback_mock = Mock(side_effect=user_may_join_room)
callback_mock = Mock(side_effect=user_may_join_room, spec=lambda *x: None)
self.hs.get_spam_checker()._user_may_join_room_callbacks.append(callback_mock)

# Join a first room, without being invited to it.
Expand Down

0 comments on commit 9f8f6a5

Please sign in to comment.