summary refs log tree commit diff
path: root/tests/rest/client/test_identity.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-26 12:03:29 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-26 12:03:29 +0000
commit90900898adcadd828e4935ce0a3d8d188f0830d3 (patch)
tree64f48487b11ab3f3f773db98e15b683d27168276 /tests/rest/client/test_identity.py
parentMerge pull request #6108 from matrix-org/erikj/remove_get_user_by_req-span (diff)
parentMove lookup-related functions from RoomMemberHandler to IdentityHandler (#5978) (diff)
downloadsynapse-90900898adcadd828e4935ce0a3d8d188f0830d3.tar.xz
Move lookup-related functions from RoomMemberHandler to IdentityHandler (#5978)
Diffstat (limited to 'tests/rest/client/test_identity.py')
-rw-r--r--tests/rest/client/test_identity.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/rest/client/test_identity.py b/tests/rest/client/test_identity.py

index b7f57781fc..e163a46f6b 100644 --- a/tests/rest/client/test_identity.py +++ b/tests/rest/client/test_identity.py
@@ -117,6 +117,13 @@ class IdentityEnabledTestCase(unittest.HomeserverTestCase): config=config, simple_http_client=mock_http_client ) + # 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 + ) + return self.hs def prepare(self, reactor, clock, hs): @@ -151,7 +158,7 @@ class IdentityEnabledTestCase(unittest.HomeserverTestCase): ) self.render(request) - get_json = self.hs.get_room_member_handler().simple_http_client.get_json + get_json = self.hs.get_handlers().identity_handler.http_client.get_json get_json.assert_called_once_with( "https://testis/_matrix/identity/api/v1/lookup", {"address": "test@example.com", "medium": "email"},