[IMP] attachment_queue: mute expected errors in test logs

pull/2646/head
Stefan Rijnhart 2023-06-05 19:25:14 +02:00
parent dd2d2eb691
commit be396c8bc8
1 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ from odoo_test_helper import FakeModelLoader
from odoo import registry
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger
from odoo.addons.queue_job.exception import RetryableJobError
from odoo.addons.queue_job.tests.common import trap_jobs
@ -70,7 +71,7 @@ class TestAttachmentBaseQueue(TransactionCase):
""",
(attachment.id,),
)
with self.assertRaises(RetryableJobError):
with self.assertRaises(RetryableJobError), mute_logger("odoo.sql_db"):
attachment.run_as_job()
def test_aq_locked_button(self):
@ -87,7 +88,7 @@ class TestAttachmentBaseQueue(TransactionCase):
""",
(attachment.id,),
)
with self.assertRaises(UserError):
with self.assertRaises(UserError), mute_logger("odoo.sql_db"):
attachment.button_manual_run()
def test_run_ok(self):