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

Commit 0438d17

Browse files
committed
Fix tests
1 parent 84eb1c8 commit 0438d17

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/federation/test_federation_sender.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def make_homeserver(self, reactor, clock):
3434
federation_transport_client=Mock(spec=["send_transaction"]),
3535
)
3636

37-
hs.get_datastores().main.get_current_hosts_in_room = Mock(
37+
hs.get_storage_controllers().state.get_current_hosts_in_room = Mock(
3838
return_value=make_awaitable(["test", "host2"])
3939
)
4040

tests/handlers/test_typing.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ async def check_host_in_room(room_id: str, server_name: str) -> bool:
129129

130130
hs.get_event_auth_handler().check_host_in_room = check_host_in_room
131131

132-
def get_joined_hosts_for_room(room_id: str):
132+
async def get_current_hosts_in_room(room_id: str):
133133
return {member.domain for member in self.room_members}
134134

135-
self.datastore.get_joined_hosts_for_room = get_joined_hosts_for_room
135+
hs.get_storage_controllers().state.get_current_hosts_in_room = (
136+
get_current_hosts_in_room
137+
)
136138

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

0 commit comments

Comments
 (0)