diff --git a/backend/app/tests/ui/test_e2e_pdf_jobs.py b/backend/app/tests/ui/test_e2e_pdf_jobs.py index 7a8003f8..7c36a05e 100644 --- a/backend/app/tests/ui/test_e2e_pdf_jobs.py +++ b/backend/app/tests/ui/test_e2e_pdf_jobs.py @@ -62,9 +62,9 @@ def test_e2e_pdf_jobs(chrome_page_slow, corgi_base_url, repo, book, version): assert ".pdf" in href_pdf_url r_url = Request(href_pdf_url) - pdf_url = urlopen(r_url).read() + response = urlopen(r_url) - io_file = io.BytesIO(pdf_url) + io_file = io.BytesIO(response.read()) pdf_read = PdfReader(io_file) pdf_title = pdf_read.metadata.title @@ -99,8 +99,6 @@ def test_e2e_pdf_jobs(chrome_page_slow, corgi_base_url, repo, book, version): flat_liszt = [item for sublist in liszt for item in sublist] - print(flat_liszt) - try: assert any("Preface" in word for word in flat_liszt) assert any("Chapter Outline" in word for word in flat_liszt)