Add type hints for event streams. (#10856)

This commit is contained in:
Patrick Cloke 2021-09-21 13:34:26 -04:00 committed by GitHub
parent b25a494779
commit 4054dfa409
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 169 additions and 60 deletions

View file

@ -41,7 +41,7 @@ class RoomTypingTestCase(unittest.HomeserverTestCase):
federation_client=Mock(),
)
self.event_source = hs.get_event_sources().sources["typing"]
self.event_source = hs.get_event_sources().sources.typing
hs.get_federation_handler = Mock()
@ -76,7 +76,13 @@ class RoomTypingTestCase(unittest.HomeserverTestCase):
self.assertEquals(self.event_source.get_current_key(), 1)
events = self.get_success(
self.event_source.get_new_events(from_key=0, room_ids=[self.room_id])
self.event_source.get_new_events(
user=UserID.from_string(self.user_id),
from_key=0,
limit=None,
room_ids=[self.room_id],
is_guest=False,
)
)
self.assertEquals(
events[0],