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

@ -193,7 +193,7 @@ class RoomTestCase(_ShadowBannedBase):
self.assertEquals(200, channel.code)
# There should be no typing events.
event_source = self.hs.get_event_sources().sources["typing"]
event_source = self.hs.get_event_sources().sources.typing
self.assertEquals(event_source.get_current_key(), 0)
# The other user can join and send typing events.
@ -210,7 +210,13 @@ class RoomTestCase(_ShadowBannedBase):
# These appear in the room.
self.assertEquals(event_source.get_current_key(), 1)
events = self.get_success(
event_source.get_new_events(from_key=0, room_ids=[room_id])
event_source.get_new_events(
user=UserID.from_string(self.other_user_id),
from_key=0,
limit=None,
room_ids=[room_id],
is_guest=False,
)
)
self.assertEquals(
events[0],