mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:06:08 -04:00
Fix unit tests
This commit is contained in:
parent
bed10f9880
commit
93b32d4515
2 changed files with 6 additions and 41 deletions
|
@ -62,6 +62,7 @@ class TypingNotificationsTestCase(unittest.TestCase):
|
|||
self.on_new_event = mock_notifier.on_new_event
|
||||
|
||||
self.auth = Mock(spec=[])
|
||||
self.state_handler = Mock()
|
||||
|
||||
hs = yield setup_test_homeserver(
|
||||
"test",
|
||||
|
@ -75,6 +76,7 @@ class TypingNotificationsTestCase(unittest.TestCase):
|
|||
"set_received_txn_response",
|
||||
"get_destination_retry_timings",
|
||||
]),
|
||||
state_handler=self.state_handler,
|
||||
handlers=None,
|
||||
notifier=mock_notifier,
|
||||
resource_for_client=Mock(),
|
||||
|
@ -113,6 +115,10 @@ class TypingNotificationsTestCase(unittest.TestCase):
|
|||
return set(member.domain for member in self.room_members)
|
||||
self.datastore.get_joined_hosts_for_room = get_joined_hosts_for_room
|
||||
|
||||
def get_current_user_in_room(room_id):
|
||||
return set(str(u) for u in self.room_members)
|
||||
self.state_handler.get_current_user_in_room = get_current_user_in_room
|
||||
|
||||
self.auth.check_joined_room = check_joined_room
|
||||
|
||||
# Some local users to test with
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue