summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-05-14 11:51:16 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-05-14 11:51:16 +0100
commit3fb2ea99329ad2c4f054deff83ad19af571241f8 (patch)
tree28b881fcb9973f47da50bf0733d17b2262bca76a /tests
parentTemporarily add m.lazy_load_members to unstable_features (diff)
downloadsynapse-3fb2ea99329ad2c4f054deff83ad19af571241f8.tar.xz
apply linting
Diffstat (limited to 'tests')
-rw-r--r--tests/http/federation/test_matrix_federation_agent.py4
-rw-r--r--tests/rest/client/test_identity.py8
-rw-r--r--tests/rest/client/test_room_access_rules.py9
3 files changed, 9 insertions, 12 deletions
diff --git a/tests/http/federation/test_matrix_federation_agent.py b/tests/http/federation/test_matrix_federation_agent.py
index ea52330c8e..b1482db39a 100644
--- a/tests/http/federation/test_matrix_federation_agent.py
+++ b/tests/http/federation/test_matrix_federation_agent.py
@@ -32,9 +32,7 @@ from twisted.web.iweb import IPolicyForHTTPS
 
 from synapse.config.homeserver import HomeServerConfig
 from synapse.crypto.context_factory import FederationPolicyForHTTPS
-from synapse.http.federation.matrix_federation_agent import (
-    MatrixFederationAgent,
-)
+from synapse.http.federation.matrix_federation_agent import MatrixFederationAgent
 from synapse.http.federation.srv_resolver import Server
 from synapse.http.federation.well_known_resolver import (
     WellKnownResolver,
diff --git a/tests/rest/client/test_identity.py b/tests/rest/client/test_identity.py
index e163a46f6b..4224b0a92e 100644
--- a/tests/rest/client/test_identity.py
+++ b/tests/rest/client/test_identity.py
@@ -120,9 +120,7 @@ class IdentityEnabledTestCase(unittest.HomeserverTestCase):
         # TODO: This class does not use a singleton to get it's http client
         # This should be fixed for easier testing
         # https://github.com/matrix-org/synapse-dinsic/issues/26
-        self.hs.get_handlers().identity_handler.http_client = (
-            mock_http_client
-        )
+        self.hs.get_handlers().identity_handler.http_client = mock_http_client
 
         return self.hs
 
@@ -142,8 +140,8 @@ class IdentityEnabledTestCase(unittest.HomeserverTestCase):
         self.hs.get_room_member_handler().simple_http_client = Mock(
             spec=["get_json", "post_json_get_json"]
         )
-        self.hs.get_room_member_handler().simple_http_client.get_json.return_value = (
-            defer.succeed((200, "{}"))
+        self.hs.get_room_member_handler().simple_http_client.get_json.return_value = defer.succeed(
+            (200, "{}")
         )
 
         params = {
diff --git a/tests/rest/client/test_room_access_rules.py b/tests/rest/client/test_room_access_rules.py
index f10ae0adeb..7da0ef4e18 100644
--- a/tests/rest/client/test_room_access_rules.py
+++ b/tests/rest/client/test_room_access_rules.py
@@ -21,6 +21,7 @@ import string
 from mock import Mock
 
 from twisted.internet import defer
+
 from synapse.api.constants import EventTypes, JoinRules, RoomCreationPreset
 from synapse.rest import admin
 from synapse.rest.client.v1 import login, room
@@ -83,9 +84,7 @@ class RoomAccessTestCase(unittest.HomeserverTestCase):
         mock_federation_client = Mock(spec=["send_invite"])
         mock_federation_client.send_invite.side_effect = send_invite
 
-        mock_http_client = Mock(
-            spec=["get_json", "post_json_get_json"],
-        )
+        mock_http_client = Mock(spec=["get_json", "post_json_get_json"],)
         # Mocking the response for /info on the IS API.
         mock_http_client.get_json.side_effect = get_json
         # Mocking the response for /store-invite on the IS API.
@@ -99,7 +98,9 @@ class RoomAccessTestCase(unittest.HomeserverTestCase):
         # TODO: This class does not use a singleton to get it's http client
         # This should be fixed for easier testing
         # https://github.com/matrix-org/synapse-dinsic/issues/26
-        self.hs.get_handlers().identity_handler.blacklisting_http_client = mock_http_client
+        self.hs.get_handlers().identity_handler.blacklisting_http_client = (
+            mock_http_client
+        )
 
         return self.hs