tests_secrets_cli: improve assertion message for pgp key

This commit is contained in:
Jörg Thalheim
2025-05-03 17:35:55 +02:00
parent 82949237b7
commit 15f691d5aa

View File

@@ -982,7 +982,10 @@ def test_secrets_key_generate_gpg(
]
)
assert "age private key" not in output.out
assert re.match(r"PGP key.+is already set", output.err) is not None
assert re.match(r"PGP key.+is already set", output.err), (
f"expected /PGP key.+is already set/ =~ {output.err}"
)
with capture_output as output:
cli.run(