From 6f628751144e88aa6adb2d57d0b495edc593385e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mart=C3=ADn?= Date: Fri, 25 Aug 2023 17:23:08 +0200 Subject: [PATCH] [IMP] Avoiding ERROR in log with tests of report_qweb_pdf_watermark --- .../tests/test_report_qweb_pdf_watermark.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py b/report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py index 4eb66cd96a..6484eb08b8 100644 --- a/report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py +++ b/report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py @@ -51,7 +51,8 @@ def test_pdf_has_usable_pages(self): # test 0 numpages = 0 # pdf_has_usable_pages(self, pdf_watermark) - self.assertFalse(self.env["ir.actions.report"].pdf_has_usable_pages(numpages)) + with self.assertLogs(level='ERROR'): + self.assertFalse(self.env["ir.actions.report"].pdf_has_usable_pages(numpages)) # test 1 numpages = 1 self.assertTrue(self.env["ir.actions.report"].pdf_has_usable_pages(numpages))