mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 20:54:50 -04:00
Implement .cancel_call_later() in MockClock
This commit is contained in:
parent
38da9884e7
commit
4551afc6d2
2 changed files with 23 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue