evaluate --cert before --key

This commit is contained in:
James Warne 2022-04-18 08:52:01 -04:00 committed by David Lord
parent dba2be9311
commit 5050a18a00
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 11 additions and 1 deletions

View file

@ -553,9 +553,14 @@ def test_run_cert_path():
with pytest.raises(click.BadParameter):
run_command.make_context("run", ["--key", __file__])
# cert specified first
ctx = run_command.make_context("run", ["--cert", __file__, "--key", __file__])
assert ctx.params["cert"] == (__file__, __file__)
# key specified first
ctx = run_command.make_context("run", ["--key", __file__, "--cert", __file__])
assert ctx.params["cert"] == (__file__, __file__)
def test_run_cert_adhoc(monkeypatch):
monkeypatch.setitem(sys.modules, "cryptography", None)