1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rest/client/test_identity.py b/tests/rest/client/test_identity.py
index ed149f3600..b942f1ffe6 100644
--- a/tests/rest/client/test_identity.py
+++ b/tests/rest/client/test_identity.py
@@ -26,6 +26,7 @@ from tests import unittest
class IdentityDisabledTestCase(unittest.HomeserverTestCase):
+ """Tests that 3PID lookup attempts fail when the HS's config disallows them."""
servlets = [
account.register_servlets,
@@ -38,6 +39,10 @@ class IdentityDisabledTestCase(unittest.HomeserverTestCase):
config = self.default_config()
config.enable_3pid_lookup = False
+ config.trusted_third_party_id_servers = [
+ "testis"
+ ]
+
self.hs = self.setup_test_homeserver(config=config)
return self.hs
@@ -100,6 +105,7 @@ class IdentityDisabledTestCase(unittest.HomeserverTestCase):
class IdentityEnabledTestCase(unittest.HomeserverTestCase):
+ """Tests that 3PID lookup attempts succeed when the HS's config allows them."""
servlets = [
account.register_servlets,
@@ -112,6 +118,9 @@ class IdentityEnabledTestCase(unittest.HomeserverTestCase):
config = self.default_config()
config.enable_3pid_lookup = True
+ config.trusted_third_party_id_servers = [
+ "testis"
+ ]
mock_http_client = Mock(spec=[
"get_json",
|