mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] migrate report_wkhtmltopdf_param to 18.0
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
import logging
|
||||
|
||||
import odoo.tests
|
||||
from odoo.exceptions import ValidationError
|
||||
from odoo.tests.common import tagged
|
||||
@@ -11,7 +13,10 @@ from odoo.tests.common import tagged
|
||||
class TestWkhtmltopdf(odoo.tests.TransactionCase):
|
||||
def test_wkhtmltopdf_incorrect_parameter(self):
|
||||
for report_paperformat in self.env["report.paperformat"].search([]):
|
||||
with self.assertRaises(ValidationError):
|
||||
with (
|
||||
self.assertRaises(ValidationError),
|
||||
self.assertLogs(level=logging.WARNING),
|
||||
):
|
||||
report_paperformat.update(
|
||||
{"custom_params": [(0, 0, {"name": "bad-parameter"})]}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user