summaryrefslogtreecommitdiff
path: root/tests/replication
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-07-19 12:57:39 +0100
committerRichard van der Hoff <richard@matrix.org>2018-07-19 12:57:39 +0100
commitef2188c1bfd532ddc2e4c1acb533b422afde6c57 (patch)
treea9483e827cfabebcbb422c9a6426b53f928f3d31 /tests/replication
parentd24e9b285fd8d602c3b12c6ba589da0dd2cddee3 (diff)
Imported Upstream version 0.33.0
Diffstat (limited to 'tests/replication')
-rw-r--r--tests/replication/slave/storage/_base.py15
-rw-r--r--tests/replication/slave/storage/test_account_data.py4
-rw-r--r--tests/replication/slave/storage/test_events.py5
-rw-r--r--tests/replication/slave/storage/test_receipts.py4
4 files changed, 15 insertions, 13 deletions
diff --git a/tests/replication/slave/storage/_base.py b/tests/replication/slave/storage/_base.py
index 64e07a8c..8708c8a1 100644
--- a/tests/replication/slave/storage/_base.py
+++ b/tests/replication/slave/storage/_base.py
@@ -12,17 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from twisted.internet import defer, reactor
-from tests import unittest
-
import tempfile
from mock import Mock, NonCallableMock
-from tests.utils import setup_test_homeserver
-from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory
+
+from twisted.internet import defer, reactor
+
from synapse.replication.tcp.client import (
- ReplicationClientHandler, ReplicationClientFactory,
+ ReplicationClientFactory,
+ ReplicationClientHandler,
)
+from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory
+
+from tests import unittest
+from tests.utils import setup_test_homeserver
class BaseSlavedStoreTestCase(unittest.TestCase):
diff --git a/tests/replication/slave/storage/test_account_data.py b/tests/replication/slave/storage/test_account_data.py
index f47a42e4..adf22640 100644
--- a/tests/replication/slave/storage/test_account_data.py
+++ b/tests/replication/slave/storage/test_account_data.py
@@ -13,11 +13,11 @@
# limitations under the License.
-from ._base import BaseSlavedStoreTestCase
+from twisted.internet import defer
from synapse.replication.slave.storage.account_data import SlavedAccountDataStore
-from twisted.internet import defer
+from ._base import BaseSlavedStoreTestCase
USER_ID = "@feeling:blue"
TYPE = "my.type"
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py
index cb058d31..cea01d93 100644
--- a/tests/replication/slave/storage/test_events.py
+++ b/tests/replication/slave/storage/test_events.py
@@ -12,15 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from ._base import BaseSlavedStoreTestCase
+from twisted.internet import defer
from synapse.events import FrozenEvent, _EventInternalMetadata
from synapse.events.snapshot import EventContext
from synapse.replication.slave.storage.events import SlavedEventStore
from synapse.storage.roommember import RoomsForUser
-from twisted.internet import defer
-
+from ._base import BaseSlavedStoreTestCase
USER_ID = "@feeling:blue"
USER_ID_2 = "@bright:blue"
diff --git a/tests/replication/slave/storage/test_receipts.py b/tests/replication/slave/storage/test_receipts.py
index 6624fe4e..e6d670cc 100644
--- a/tests/replication/slave/storage/test_receipts.py
+++ b/tests/replication/slave/storage/test_receipts.py
@@ -12,11 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from ._base import BaseSlavedStoreTestCase
+from twisted.internet import defer
from synapse.replication.slave.storage.receipts import SlavedReceiptsStore
-from twisted.internet import defer
+from ._base import BaseSlavedStoreTestCase
USER_ID = "@feeling:blue"
ROOM_ID = "!room:blue"