From e5125bf59ba77f2547cf9130d701a3544954fc7b Mon Sep 17 00:00:00 2001 From: Esben Sonne Date: Wed, 7 Aug 2019 20:46:46 +0200 Subject: [PATCH] Add ssl config test --- tests/test_config.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index e103895c8..69ebdc519 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -65,3 +65,11 @@ def test_socket_bind(): config.load() assert isinstance(config.bind_socket(), socket.socket) + + +def test_ssl_config(certfile_and_keyfile): + certfile, keyfile = certfile_and_keyfile + config = Config(app=asgi_app, ssl_certfile=certfile.name, ssl_keyfile=keyfile.name) + config.load() + + assert bool(config.is_ssl) is True