diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-09-24 17:25:41 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-09-24 17:25:41 +0100 |
commit | 52ca8676700368098ca0689c424f972ac54ac780 (patch) | |
tree | 43bc0d4caeb33bc342f5b5a604dcfd0eac89cb4f /tests/utils.py | |
parent | Fix a few pyflakes errors in the server_key_resource (diff) | |
download | synapse-52ca8676700368098ca0689c424f972ac54ac780.tar.xz |
Sign federation transactions
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py index bc5d35e56b..beb2aef084 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -108,6 +108,21 @@ class MockHttpResource(HttpServer): self.callbacks.append((method, path_pattern, callback)) +class MockKey(object): + alg = "mock_alg" + version = "mock_version" + + @property + def verify_key(self): + return self + + def sign(self, message): + return b"\x9a\x87$" + + def verify(self, message, sig): + assert sig == b"\x9a\x87$" + + class MockClock(object): now = 1000 |