don't require ssl module for flask cli

This commit is contained in:
cslecrone 2019-05-31 11:45:38 -04:00 committed by David Lord
parent 797fb5f64b
commit f7d690e474
3 changed files with 21 additions and 1 deletions

View file

@ -611,6 +611,12 @@ def test_run_cert_import(monkeypatch):
run_command.make_context("run", ["--cert", "ssl_context", "--key", __file__])
def test_run_cert_no_ssl(monkeypatch):
monkeypatch.setattr("flask.cli.ssl", None)
with pytest.raises(click.BadParameter):
run_command.make_context("run", ["--cert", "not_here"])
def test_cli_blueprints(app):
"""Test blueprint commands register correctly to the application"""
custom = Blueprint("custom", __name__, cli_group="customized")