Initial hack at unit tests of room typing REST API

This commit is contained in:
Paul "LeoNerd" Evans 2014-12-11 16:03:04 +00:00
parent 0ca072b3b6
commit 3b2cc26053
2 changed files with 75 additions and 3 deletions

View file

@ -52,6 +52,13 @@ class TypingNotificationHandler(BaseHandler):
# map room IDs to sets of users currently typing
self._room_typing = {}
def tearDown(self):
"""Cancels all the pending timers.
Normally this shouldn't be needed, but it's required from unit tests
to avoid a "Reactor was unclean" warning."""
for t in self._member_typing_timer.values():
self.clock.cancel_call_later(t)
@defer.inlineCallbacks
def started_typing(self, target_user, auth_user, room_id, timeout):
if not target_user.is_mine: