File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change 11"""Test the pypdf._encryption module."""
22import secrets
3+ from io import BytesIO
34
45import pytest
56
@@ -395,8 +396,6 @@ def test_perms_valid_true_for_v4():
395396 """perms_valid defaults to True for V4 encryption (no /Perms field)."""
396397 writer = PdfWriter (clone_from = RESOURCE_ROOT / "encryption" / "unencrypted.pdf" )
397398 writer .encrypt (user_password = "user" , owner_password = "owner" , algorithm = "RC4-128" )
398- from io import BytesIO
399-
400399 output = BytesIO ()
401400 writer .write (output )
402401 reader = PdfReader (output )
@@ -407,8 +406,6 @@ def test_perms_valid_true_for_v4():
407406@pytest .mark .skipif (not HAS_AES , reason = "No AES implementation" )
408407def test_perms_valid_false_when_tampered ():
409408 """perms_valid is False when /Perms has been tampered with."""
410- from io import BytesIO
411-
412409 writer = PdfWriter (clone_from = RESOURCE_ROOT / "encryption" / "unencrypted.pdf" )
413410 writer .encrypt (user_password = "user" , owner_password = "owner" , algorithm = "AES-256" )
414411 output = BytesIO ()
You can’t perform that action at this time.
0 commit comments