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

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Jun 6, 2022
1 parent 84eb1c8 commit 0438d17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/federation/test_federation_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def make_homeserver(self, reactor, clock):
federation_transport_client=Mock(spec=["send_transaction"]),
)

hs.get_datastores().main.get_current_hosts_in_room = Mock(
hs.get_storage_controllers().state.get_current_hosts_in_room = Mock(
return_value=make_awaitable(["test", "host2"])
)

Expand Down
6 changes: 4 additions & 2 deletions tests/handlers/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ async def check_host_in_room(room_id: str, server_name: str) -> bool:

hs.get_event_auth_handler().check_host_in_room = check_host_in_room

def get_joined_hosts_for_room(room_id: str):
async def get_current_hosts_in_room(room_id: str):
return {member.domain for member in self.room_members}

self.datastore.get_joined_hosts_for_room = get_joined_hosts_for_room
hs.get_storage_controllers().state.get_current_hosts_in_room = (
get_current_hosts_in_room
)

async def get_users_in_room(room_id: str):
return {str(u) for u in self.room_members}
Expand Down

0 comments on commit 0438d17

Please sign in to comment.