Central internal_ssl switch

This commit is contained in:
Omar Richardson
2020-11-20 15:27:50 +01:00
parent 09ff03ca4f
commit 0472ef0533
4 changed files with 3 additions and 7 deletions

View File

@@ -74,7 +74,9 @@ def ssl_tmpdir(tmpdir_factory):
def app(request, io_loop, ssl_tmpdir):
"""Mock a jupyterhub app for testing"""
mocked_app = None
ssl_enabled = getattr(request.module, "ssl_enabled", False)
ssl_enabled = request.module.getattr(
'ssl_enabled', os.environ.get('SSL_ENABLED', False)
)
kwargs = dict()
if ssl_enabled:
kwargs.update(dict(internal_ssl=True, internal_certs_location=str(ssl_tmpdir)))