diff --git a/tests/test_config.py b/tests/test_config.py index 69ebdc519..58dfe5d6a 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -72,4 +72,4 @@ def test_ssl_config(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 + assert config.is_ssl is True diff --git a/uvicorn/config.py b/uvicorn/config.py index 3830230eb..76abcee29 100644 --- a/uvicorn/config.py +++ b/uvicorn/config.py @@ -143,7 +143,7 @@ def __init__( @property def is_ssl(self) -> bool: - return self.ssl_keyfile or self.ssl_certfile + return bool(self.ssl_keyfile or self.ssl_certfile) def load(self): assert not self.loaded