MCPcopy
hub / github.com/pallets/flask / test_run_cert_path

Function test_run_cert_path

tests/test_cli.py:584–599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

582
583
584def test_run_cert_path():
585 # no key
586 with pytest.raises(click.BadParameter):
587 run_command.make_context("run", ["--cert", __file__])
588
589 # no cert
590 with pytest.raises(click.BadParameter):
591 run_command.make_context("run", ["--key", __file__])
592
593 # cert specified first
594 ctx = run_command.make_context("run", ["--cert", __file__, "--key", __file__])
595 assert ctx.params["cert"] == (__file__, __file__)
596
597 # key specified first
598 ctx = run_command.make_context("run", ["--key", __file__, "--cert", __file__])
599 assert ctx.params["cert"] == (__file__, __file__)
600
601
602def test_run_cert_adhoc(monkeypatch):

Callers

nothing calls this directly

Calls 1

make_contextMethod · 0.80

Tested by

no test coverage detected