Skip to content

Commit d231598

Browse files
committed
[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. ```
1 parent b7b20b0 commit d231598

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

queue_job/tests/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def button_that_uses_delayable_chain(self):
9696
with mock.patch(
9797
"odoo.addons.queue_job.delay.Job",
9898
name="Job Class",
99-
auto_spec=True,
10099
unsafe=True,
101100
) as job_cls_mock:
102101
with JobsTrap(job_cls_mock) as trap:

0 commit comments

Comments
 (0)