Skip to content

Comments

[FIX] mock.patch(auto_spec=True) does not exist#904

Merged
OCA-git-bot merged 1 commit intoOCA:19.0from
gurneyalex:19.0-queue_job_auto_test_typo
Feb 20, 2026
Merged

[FIX] mock.patch(auto_spec=True) does not exist#904
OCA-git-bot merged 1 commit intoOCA:19.0from
gurneyalex:19.0-queue_job_auto_test_typo

Conversation

@gurneyalex
Copy link
Member

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.

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.
```
@gurneyalex
Copy link
Member Author

Forward port of #898

@gurneyalex gurneyalex added this to the 19.0 milestone Feb 20, 2026
Copy link
Member

@guewen guewen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 19.0-ocabot-merge-pr-904-by-guewen-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 0c942e5 into OCA:19.0 Feb 20, 2026
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 0c942e5. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants