summary refs log tree commit diff
path: root/tests/test_terms_auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-09-25 17:53:13 +0100
committerErik Johnston <erik@matrix.org>2019-09-25 17:53:13 +0100
commit4fb3c129aa96377d5b78c9e39d42eee2a4e9ae88 (patch)
tree7780de5531566372372992521f2476551a51be73 /tests/test_terms_auth.py
parentReview comments (diff)
parentMerge pull request #6089 from matrix-org/erikj/cleanup_user_ips (diff)
downloadsynapse-4fb3c129aa96377d5b78c9e39d42eee2a4e9ae88.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/cleanup_user_ips_2
Diffstat (limited to 'tests/test_terms_auth.py')
-rw-r--r--tests/test_terms_auth.py24
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/test_terms_auth.py b/tests/test_terms_auth.py
index 52739fbabc..5ec5d2b358 100644
--- a/tests/test_terms_auth.py
+++ b/tests/test_terms_auth.py
@@ -28,6 +28,21 @@ from tests import unittest
 class TermsTestCase(unittest.HomeserverTestCase):
     servlets = [register_servlets]
 
+    def default_config(self, name="test"):
+        config = super().default_config(name)
+        config.update(
+            {
+                "public_baseurl": "https://example.org/",
+                "user_consent": {
+                    "version": "1.0",
+                    "policy_name": "My Cool Privacy Policy",
+                    "template_dir": "/",
+                    "require_at_registration": True,
+                },
+            }
+        )
+        return config
+
     def prepare(self, reactor, clock, hs):
         self.clock = MemoryReactorClock()
         self.hs_clock = Clock(self.clock)
@@ -35,17 +50,8 @@ class TermsTestCase(unittest.HomeserverTestCase):
         self.registration_handler = Mock()
         self.auth_handler = Mock()
         self.device_handler = Mock()
-        hs.config.enable_registration = True
-        hs.config.registrations_require_3pid = []
-        hs.config.auto_join_rooms = []
-        hs.config.enable_registration_captcha = False
 
     def test_ui_auth(self):
-        self.hs.config.user_consent_at_registration = True
-        self.hs.config.user_consent_policy_name = "My Cool Privacy Policy"
-        self.hs.config.public_baseurl = "https://example.org/"
-        self.hs.config.user_consent_version = "1.0"
-
         # Do a UI auth request
         request, channel = self.make_request(b"POST", self.url, b"{}")
         self.render(request)