mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 18:17:13 -04:00
fix UTs by telling all the mock stores about the new methods for tracking retries
This commit is contained in:
parent
c46ce4fca2
commit
8ada2d2018
4 changed files with 23 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue