summary refs log tree commit diff
path: root/tests/handlers/test_presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-10 13:18:40 +0000
committerErik Johnston <erik@matrix.org>2014-12-10 13:18:40 +0000
commitaae8a37e63662681f6e75cca5b32cfba78b0d74f (patch)
tree10aa25caddf01da913d270186fc1169deff17320 /tests/handlers/test_presence.py
parentFix AttributeError (diff)
parentupdate codestyle based on debate on #matrix-dev (diff)
downloadsynapse-aae8a37e63662681f6e75cca5b32cfba78b0d74f.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor
Diffstat (limited to 'tests/handlers/test_presence.py')
-rw-r--r--tests/handlers/test_presence.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/handlers/test_presence.py b/tests/handlers/test_presence.py

index fe69ce47eb..b85a89052a 100644 --- a/tests/handlers/test_presence.py +++ b/tests/handlers/test_presence.py
@@ -30,7 +30,7 @@ from synapse.api.constants import PresenceState from synapse.api.errors import SynapseError from synapse.handlers.presence import PresenceHandler, UserPresenceCache from synapse.streams.config import SourcePaginationConfig - +from synapse.storage.transactions import DestinationsTable OFFLINE = PresenceState.OFFLINE UNAVAILABLE = PresenceState.UNAVAILABLE @@ -528,6 +528,7 @@ class PresencePushTestCase(unittest.TestCase): "delivered_txn", "get_received_txn_response", "set_received_txn_response", + "get_destination_retry_timings", ]), handlers=None, resource_for_client=Mock(), @@ -539,6 +540,9 @@ class PresencePushTestCase(unittest.TestCase): hs.handlers = JustPresenceHandlers(hs) self.datastore = hs.get_datastore() + self.datastore.get_destination_retry_timings.return_value = ( + defer.succeed(DestinationsTable.EntryType("", 0, 0)) + ) def get_received_txn_response(*args): return defer.succeed(None) @@ -1037,6 +1041,7 @@ class PresencePollingTestCase(unittest.TestCase): "delivered_txn", "get_received_txn_response", "set_received_txn_response", + "get_destination_retry_timings", ]), handlers=None, resource_for_client=Mock(), @@ -1048,6 +1053,9 @@ class PresencePollingTestCase(unittest.TestCase): hs.handlers = JustPresenceHandlers(hs) self.datastore = hs.get_datastore() + self.datastore.get_destination_retry_timings.return_value = ( + defer.succeed(DestinationsTable.EntryType("", 0, 0)) + ) def get_received_txn_response(*args): return defer.succeed(None)