This commit is contained in:
2024-04-29 11:02:40 -05:00
parent c9f1da7027
commit ea131e4bc1
13 changed files with 83 additions and 153 deletions

View File

@ -409,12 +409,12 @@ def test_convert_signature_packet(
(
Path("foo.asc"),
[
Path("--PublicKey"),
Path("--Signature"),
Path("--UserID"),
Path("--UserAttribute"),
Path("--PublicSubkey"),
Path("--Signature"),
Path(keyring.PacketType.PUBLIC_KEY.value),
Path(keyring.PacketType.SIGNATURE.value),
Path(keyring.PacketType.USER_ID.value),
Path(keyring.PacketType.USER_ATTRIBUTE.value),
Path(keyring.PacketType.PUBLIC_SUBKEY.value),
Path(keyring.PacketType.SIGNATURE.value),
],
[
"".join(choice("ABCDEF" + digits) for _ in range(40)),
@ -427,10 +427,10 @@ def test_convert_signature_packet(
(
Path("foo.asc"),
[
Path("--PublicKey"),
Path("--Signature"),
Path("--UserID"),
Path("--UserID"),
Path(keyring.PacketType.PUBLIC_KEY.value),
Path(keyring.PacketType.SIGNATURE.value),
Path(keyring.PacketType.USER_ID.value),
Path(keyring.PacketType.USER_ID.value),
],
[
"".join(choice("ABCDEF" + digits) for _ in range(40)),
@ -443,7 +443,7 @@ def test_convert_signature_packet(
(
Path("foo.asc"),
[
Path("--SecretKey"),
Path(keyring.PacketType.SECRET_KEY.value),
],
[],
None,
@ -461,7 +461,7 @@ def test_convert_signature_packet(
(
Path("foo.asc"),
[
Path("--PublicKey"),
Path(keyring.PacketType.PUBLIC_KEY.value),
],
[
None,

View File

@ -166,7 +166,7 @@ def test_inspect(
def test_packet_dump(system_mock: Mock) -> None:
system_mock.return_value = "return"
assert sequoia.packet_dump(packet=Path("packet")) == "return"
system_mock.called_once_with(["sq", "packet", "dump", "packet"])
system_mock.assert_called_once_with(["sq", "toolbox", "packet", "dump", "packet"])
@mark.parametrize(