diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-13 18:26:42 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-08-13 19:19:15 +0100 |
commit | fc778e2bce34825b068e2a90eac09c05d8cce747 (patch) | |
tree | e00146e84bc9b61cf4e152c9f7dd68eed80d4664 /tests/utils.py | |
parent | Set datastore's .hs field in SQLBaseStore rather than in the toplevel DataSto... (diff) | |
download | synapse-fc778e2bce34825b068e2a90eac09c05d8cce747.tar.xz |
Move MockClock into tests.utils so we can reüse it
Diffstat (limited to '')
-rw-r--r-- | tests/utils.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py index 578866b4f4..e397712d82 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -95,6 +95,16 @@ class MockHttpServer(HttpServer): self.callbacks.append((method, path_pattern, callback)) +class MockClock(object): + now = 1000 + + def time(self): + return self.now + + def time_msec(self): + return self.time() * 1000 + + class MemoryDataStore(object): class RoomMember(namedtuple( |