diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-01 14:12:33 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-01 14:12:33 +0100 |
commit | 9236136f3a4f0d8119d4a6333f37378f8e259e4a (patch) | |
tree | c8e806fc815f9215501e409cf20471529cef4d15 /tests/handlers | |
parent | Fix unicode database support (diff) | |
download | synapse-9236136f3a4f0d8119d4a6333f37378f8e259e4a.tar.xz |
Make work in both Maria and SQLite. Fix tests
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 04eba4289e..9b0e606918 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 bf34b7ccbd..2d76b23564 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): |