From 9ffa26916a92eba459585a28eb0d2e4efe190817 Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Sun, 15 Sep 2024 06:07:07 +0200 Subject: [PATCH] Fix tests --- tests/test_encryption.py | 2 +- tests/test_reader.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_encryption.py b/tests/test_encryption.py index f5c494cb99..be92e40a90 100644 --- a/tests/test_encryption.py +++ b/tests/test_encryption.py @@ -205,7 +205,7 @@ def test_attempt_decrypt_unencrypted_pdf(): path = RESOURCE_ROOT / "crazyones.pdf" with pytest.raises(PdfReadError) as exc: PdfReader(path, password="nonexistent") - assert exc.value.args[0] == "Not encrypted file" + assert exc.value.args[0] == "Not an encrypted file" @pytest.mark.skipif(not HAS_AES, reason="No AES implementation") diff --git a/tests/test_reader.py b/tests/test_reader.py index 99555cd223..e495ebbc34 100644 --- a/tests/test_reader.py +++ b/tests/test_reader.py @@ -1293,7 +1293,7 @@ def test_reader(caplog): url = "https://github.com/py-pdf/pypdf/files/9464742/shiv_resume.pdf" name = "shiv_resume.pdf" reader = PdfReader(BytesIO(get_data_from_url(url, name=name))) - assert "Previous trailer can not be read" in caplog.text + assert "Previous trailer cannot be read" in caplog.text caplog.clear() # first call requires some reparations... reader.pages[0].extract_text()