diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-12-11 16:03:04 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-12-11 16:03:12 +0000 |
commit | 3b2cc260531c18681c29e771a79f3374013b5c63 (patch) | |
tree | 0c2e97f11e100df8969fb6bb1d08be32406187c9 /synapse | |
parent | Initial tiny hack at REST API for setting room typing notification status (diff) | |
download | synapse-3b2cc260531c18681c29e771a79f3374013b5c63.tar.xz |
Initial hack at unit tests of room typing REST API
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/typing.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index 989f73947f..c2b890261a 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -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: |