Skip to content

Commit b94fcc5

Browse files
committed
TST: add test for check-sign with pdf signed by pdfly
1 parent 660a188 commit b94fcc5

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

tests/test_check_sign.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,37 @@ def test_check_sign_pem(capsys, tmp_path):
9393
# Assert
9494
assert exit_code == 0
9595
assert not captured.err
96+
97+
98+
def test_check_sign_pdfly_signed_pdf(capsys, tmp_path):
99+
# Arrange
100+
with chdir(tmp_path):
101+
exit_code = run_cli(
102+
[
103+
"sign",
104+
str(RESOURCES_ROOT / "input8.pdf"),
105+
"-o",
106+
str(tmp_path / "input8_signed.pdf"),
107+
"--p12",
108+
str(RESOURCES_ROOT / "signing-certificate.p12"),
109+
"--p12-password",
110+
"fpdf2",
111+
]
112+
)
113+
captured = capsys.readouterr()
114+
115+
# Act
116+
with chdir(tmp_path):
117+
exit_code = run_cli(
118+
[
119+
"check-sign",
120+
str(tmp_path / "input8_signed.pdf"),
121+
"--pem",
122+
str(RESOURCES_ROOT / "signing-certificate.crt"),
123+
]
124+
)
125+
captured = capsys.readouterr()
126+
127+
# Assert
128+
assert exit_code == 0
129+
assert not captured.err

0 commit comments

Comments
 (0)