diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-28 14:24:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-28 14:24:08 +0100 |
commit | 9fbcf191889b655d5c93d01a738e5137aa94a354 (patch) | |
tree | 8a403e4b27825447695fe09b54bb2440df734ed5 /tests/handlers | |
parent | Merge pull request #126 from matrix-org/csauth (diff) | |
parent | Remove unused imports (diff) | |
download | synapse-9fbcf191889b655d5c93d01a738e5137aa94a354.tar.xz |
Merge pull request #123 from matrix-org/postgres
Postgres
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/test_federation.py | 9 | ||||
-rw-r--r-- | tests/handlers/test_presence.py | 7 | ||||
-rw-r--r-- | tests/handlers/test_typing.py | 7 |
3 files changed, 21 insertions, 2 deletions
diff --git a/tests/handlers/test_federation.py b/tests/handlers/test_federation.py index c13ade3286..08d2404b6c 100644 --- a/tests/handlers/test_federation.py +++ b/tests/handlers/test_federation.py @@ -87,6 +87,15 @@ class FederationTestCase(unittest.TestCase): self.datastore.get_room.return_value = defer.succeed(True) self.auth.check_host_in_room.return_value = defer.succeed(True) + retry_timings_res = { + "destination": "", + "retry_last_ts": 0, + "retry_interval": 0, + } + self.datastore.get_destination_retry_timings.return_value = ( + defer.succeed(retry_timings_res) + ) + def have_events(event_ids): return defer.succeed({}) self.datastore.have_events.side_effect = have_events diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py index 9f5580c096..70147b017e 100644 --- a/tests/handlers/test_presence.py +++ b/tests/handlers/test_presence.py @@ -194,8 +194,13 @@ class MockedDatastorePresenceTestCase(PresenceTestCase): return datastore def setUp_datastore_federation_mocks(self, datastore): + retry_timings_res = { + "destination": "", + "retry_last_ts": 0, + "retry_interval": 0, + } datastore.get_destination_retry_timings.return_value = ( - defer.succeed(DestinationsTable.EntryType("", 0, 0)) + defer.succeed(retry_timings_res) ) def get_received_txn_response(*args): diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py index 91d4102fee..b318d4944a 100644 --- a/tests/handlers/test_typing.py +++ b/tests/handlers/test_typing.py @@ -96,8 +96,13 @@ class TypingNotificationsTestCase(unittest.TestCase): self.event_source = hs.get_event_sources().sources["typing"] self.datastore = hs.get_datastore() + retry_timings_res = { + "destination": "", + "retry_last_ts": 0, + "retry_interval": 0, + } self.datastore.get_destination_retry_timings.return_value = ( - defer.succeed(DestinationsTable.EntryType("", 0, 0)) + defer.succeed(retry_timings_res) ) def get_received_txn_response(*args): |