summary refs log tree commit diff
path: root/tests/config/test_tls.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-02-13 10:29:31 +0000
committerErik Johnston <erik@matrix.org>2019-02-13 10:29:31 +0000
commit341c35614a9c46f2c03d69e7be1d33f0d21ae8ba (patch)
treefb6ab41d62e3d8fa9508bae9a71202b7b9d3ef6f /tests/config/test_tls.py
parentMerge branch 'release-v0.99.0' into matrix-org-hotfixes (diff)
parentFixup changelog (diff)
downloadsynapse-341c35614a9c46f2c03d69e7be1d33f0d21ae8ba.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'tests/config/test_tls.py')
-rw-r--r--tests/config/test_tls.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/config/test_tls.py b/tests/config/test_tls.py

index 4ccaf35603..c260d3359f 100644 --- a/tests/config/test_tls.py +++ b/tests/config/test_tls.py
@@ -20,6 +20,11 @@ from synapse.config.tls import TlsConfig from tests.unittest import TestCase +class TestConfig(TlsConfig): + def has_tls_listener(self): + return False + + class TLSConfigTests(TestCase): def test_warn_self_signed(self): @@ -55,13 +60,12 @@ s4niecZKPBizL6aucT59CsunNmmb5Glq8rlAcU+1ZTZZzGYqVYhF6axB9Qg= config = { "tls_certificate_path": os.path.join(config_dir, "cert.pem"), - "no_tls": True, "tls_fingerprints": [] } - t = TlsConfig() + t = TestConfig() t.read_config(config) - t.read_certificate_from_disk() + t.read_certificate_from_disk(require_cert_and_key=False) warnings = self.flushWarnings() self.assertEqual(len(warnings), 1)