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 6e995f2379
commit 1718f1934c
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
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")