From d231598c11790b808b6a049bf3e262a37e233e88 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Wed, 18 Feb 2026 22:16:33 +0100 Subject: [PATCH] [FIX] mock.patch(auto_spec=True) does not exist There is no parameter auto_spec to mock.patch. This is likely a typo. Running the tests with Python 3.12 give a RuntimeError ``` File "/usr/local/lib/python3.12/unittest/mock.py", line 1311, in __init__ _check_spec_arg_typos(kwargs) File "/usr/local/lib/python3.12/unittest/mock.py", line 1287, in _check_spec_arg_typos raise RuntimeError( RuntimeError: 'auto_spec' might be a typo. ``` --- queue_job/tests/common.py | 1 - 1 file changed, 1 deletion(-) diff --git a/queue_job/tests/common.py b/queue_job/tests/common.py index ec036bd639..87a5dd78a2 100644 --- a/queue_job/tests/common.py +++ b/queue_job/tests/common.py @@ -96,7 +96,6 @@ def button_that_uses_delayable_chain(self): with mock.patch( "odoo.addons.queue_job.delay.Job", name="Job Class", - auto_spec=True, unsafe=True, ) as job_cls_mock: with JobsTrap(job_cls_mock) as trap: