diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-14 10:01:04 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-14 10:01:04 +0100 |
commit | 10294b60824347d73b01f7ce4add18467d1e6f0c (patch) | |
tree | 06d04a0a2e0ccf183bfc602ce9694d5958ed7a2e /tests/utils.py | |
parent | Make feedback table also store sender. (diff) | |
parent | grammar fix (diff) | |
download | synapse-10294b60824347d73b01f7ce4add18467d1e6f0c.tar.xz |
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Conflicts: synapse/storage/_base.py
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py index 578866b4f4..20a63316fd 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -95,6 +95,20 @@ 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 + + # For unit testing + def advance_time(self, secs): + self.now += secs + + class MemoryDataStore(object): class RoomMember(namedtuple( |