From 59cfbb61145d3af18883fc57fde2a7aab9469dce 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 | 5 ++++- 1 file changed, 4 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..a4af8be91d 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,10 @@ 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))