Skip to content

Commit

Permalink
PPF-684: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
chinapandaman committed Jul 9, 2024
1 parent 0f05689 commit a037581
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Binary file added pdf_samples/scenario/issues/683.pdf
Binary file not shown.
Binary file added pdf_samples/scenario/issues/683_expected.pdf
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/scenario/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,17 @@ def test_ppf_627_fill_3(issue_pdf_directory, request):
expected = f.read()
assert len(obj.read()) == len(expected)
assert obj.read() == expected


def test_sejda_checkbox(issue_pdf_directory, request):
obj = PdfWrapper(os.path.join(issue_pdf_directory, "683.pdf")).fill(
{"test_checkbox": True}
)

expected_path = os.path.join(issue_pdf_directory, "683_expected.pdf")
request.config.results["expected_path"] = expected_path
request.config.results["stream"] = obj.read()
with open(expected_path, "rb+") as f:
expected = f.read()
assert len(obj.read()) == len(expected)
assert obj.read() == expected

0 comments on commit a037581

Please sign in to comment.