diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-01-28 12:57:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-28 12:57:41 +0000 |
commit | d04ff2a03ddecfe1aee7c597389948d83ddb52ce (patch) | |
tree | abd154c832cad033dcd352ed2945970d2e88358e /tests | |
parent | Fix idna and ipv6 literal handling in MatrixFederationAgent (#4487) (diff) | |
parent | docstrings for _RoutingResult (diff) | |
download | synapse-d04ff2a03ddecfe1aee7c597389948d83ddb52ce.tar.xz |
Merge pull request #4488 from matrix-org/rav/fed_routing/refactor
Refactoring in MatrixFederationAgent
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http/federation/test_matrix_federation_agent.py | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/tests/http/federation/test_matrix_federation_agent.py b/tests/http/federation/test_matrix_federation_agent.py index f144092a51..8257594fb8 100644 --- a/tests/http/federation/test_matrix_federation_agent.py +++ b/tests/http/federation/test_matrix_federation_agent.py @@ -166,11 +166,7 @@ class MatrixFederationAgentTests(TestCase): """ Test the behaviour when the server name contains an explicit IP (with no port) """ - - # the SRV lookup will return an empty list (XXX: why do we even do an SRV lookup?) - self.mock_resolver.resolve_service.side_effect = lambda _: [] - - # then there will be a getaddrinfo on the IP + # there will be a getaddrinfo on the IP self.reactor.lookups["1.2.3.4"] = "1.2.3.4" test_d = self._make_get_request(b"matrix://1.2.3.4/foo/bar") @@ -178,10 +174,6 @@ class MatrixFederationAgentTests(TestCase): # Nothing happened yet self.assertNoResult(test_d) - self.mock_resolver.resolve_service.assert_called_once_with( - b"_matrix._tcp.1.2.3.4", - ) - # Make sure treq is trying to connect clients = self.reactor.tcpClients self.assertEqual(len(clients), 1) @@ -215,10 +207,7 @@ class MatrixFederationAgentTests(TestCase): (with no port) """ - # the SRV lookup will return an empty list (XXX: why do we even do an SRV lookup?) - self.mock_resolver.resolve_service.side_effect = lambda _: [] - - # then there will be a getaddrinfo on the IP + # there will be a getaddrinfo on the IP self.reactor.lookups["::1"] = "::1" test_d = self._make_get_request(b"matrix://[::1]/foo/bar") @@ -226,10 +215,6 @@ class MatrixFederationAgentTests(TestCase): # Nothing happened yet self.assertNoResult(test_d) - self.mock_resolver.resolve_service.assert_called_once_with( - b"_matrix._tcp.::1", - ) - # Make sure treq is trying to connect clients = self.reactor.tcpClients self.assertEqual(len(clients), 1) |