Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Mar 26, 2020
1 parent 86c4b82 commit c042399
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/replication/slave/storage/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from synapse.replication.tcp.client import ReplicationClientFactory
from synapse.replication.tcp.handler import (
ReplicationClientHandler,
WorkerReplicationDataHandler,
ReplicationDataHandler,
)
from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory
from synapse.storage.database import make_conn
Expand Down Expand Up @@ -58,8 +58,12 @@ def prepare(self, reactor, clock, hs):
# off of the slave store rather than the main store.
self.replication_handler = ReplicationClientHandler(self.hs)
self.replication_handler.store = self.slaved_store
self.replication_handler.replication_data_handler = WorkerReplicationDataHandler(
self.slaved_store

slave_hs = Mock(wraps=hs)
slave_hs.get_datastore.return_value = self.slaved_store
slave_hs.config.worker_app = "synapsea.app.worker"
self.replication_handler.replication_data_handler = ReplicationDataHandler(
slave_hs
)

client_factory = ReplicationClientFactory(self.hs, "client_name")
Expand Down

0 comments on commit c042399

Please sign in to comment.