Skip to content
Snippets Groups Projects
Commit 932b3af9 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

add test that would have highlighted #189

parent 6b6a8012
No related branches found
No related tags found
1 merge request!254add test that would have highlighted #189
Pipeline #153478 passed
import os
from io import StringIO
from io import BytesIO
from pypdf import PdfWriter
from strass_app import utils
from strass_app.tests.test_base_test_case import TooledTestCase
......@@ -21,3 +23,11 @@ class SafePDFTestCase(TooledTestCase):
cv.seek(0)
my_io = utils.safe_pdf(cv)
self.check_no_js(my_io)
def test_binary_file_indirect_object_iter(self):
writer = PdfWriter()
writer.add_attachment("test.txt", b"content")
stream = BytesIO()
writer.write(stream)
my_io = utils.safe_pdf(stream)
self.check_no_js(my_io)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment