summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-12-02 17:40:31 +0000
committerRichard van der Hoff <richard@matrix.org>2020-12-02 18:38:29 +0000
commitc834f1d67a7feeaebc353d0170f99a618bf32b5b (patch)
tree02091b0f7bb55d0fb2b673fbfdbbc59481b6bea1 /tests/utils.py
parentRemove redundant mocking (diff)
downloadsynapse-c834f1d67a7feeaebc353d0170f99a618bf32b5b.tar.xz
remove unused `resource_for_federation`
This is now only used in `test_typing`, so move it there.
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/utils.py b/tests/utils.py
index c8d3ffbaba..f5f56e5a79 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -34,7 +34,6 @@ from synapse.api.room_versions import RoomVersions
 from synapse.config.database import DatabaseConnectionConfig
 from synapse.config.homeserver import HomeServerConfig
 from synapse.config.server import DEFAULT_ROOM_VERSION
-from synapse.federation.transport import server as federation_server
 from synapse.http.server import HttpServer
 from synapse.logging.context import current_context, set_current_context
 from synapse.server import HomeServer
@@ -42,7 +41,6 @@ from synapse.storage import DataStore
 from synapse.storage.database import LoggingDatabaseConnection
 from synapse.storage.engines import PostgresEngine, create_engine
 from synapse.storage.prepare_database import prepare_database
-from synapse.util.ratelimitutils import FederationRateLimiter
 
 # set this to True to run the tests against postgres instead of sqlite.
 #
@@ -342,24 +340,9 @@ def setup_test_homeserver(
 
     hs.get_auth_handler().validate_hash = validate_hash
 
-    fed = kwargs.get("resource_for_federation", None)
-    if fed:
-        register_federation_servlets(hs, fed)
-
     return hs
 
 
-def register_federation_servlets(hs, resource):
-    federation_server.register_servlets(
-        hs,
-        resource=resource,
-        authenticator=federation_server.Authenticator(hs),
-        ratelimiter=FederationRateLimiter(
-            hs.get_clock(), config=hs.config.rc_federation
-        ),
-    )
-
-
 def get_mock_call_args(pattern_func, mock_func):
     """ Return the arguments the mock function was called with interpreted
     by the pattern functions argument list.