summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 72843714fd..f9a34748cd 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -152,10 +152,13 @@ class MockClock(object):
         def wrapped_callback():
             LoggingContext.thread_local.current_context = current_context
             callback()
-        self.timers.append((self.now + delay, wrapped_callback))
+
+        t = (self.now + delay, wrapped_callback)
+        self.timers.append(t)
+        return t
 
     def cancel_call_later(self, timer):
-        raise NotImplementedError("Oopsie")
+        self.timers = [t for t in self.timers if t != timer]
 
     # For unit testing
     def advance_time(self, secs):