summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-08-13 19:17:30 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-08-13 19:19:15 +0100
commita6a9b71da0f68c948a9cfd6f5e552a70068fb4e3 (patch)
tree15901b9013099f887ea48d27faf98dcb0f06d6f4 /tests/utils.py
parentDon't mock out presence_handler's internal start/stop methods in presencelike... (diff)
downloadsynapse-a6a9b71da0f68c948a9cfd6f5e552a70068fb4e3.tar.xz
Allow advancing the MockClock's time
Diffstat (limited to '')
-rw-r--r--tests/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py
index e397712d82..20a63316fd 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -104,6 +104,10 @@ class MockClock(object):
     def time_msec(self):
         return self.time() * 1000
 
+    # For unit testing
+    def advance_time(self, secs):
+        self.now += secs
+
 
 class MemoryDataStore(object):