Skip to content

Comments

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

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

[FIX] mock.patch(auto_spec=True) does not exist#902
OCA-git-bot merged 1 commit intoOCA:17.0from
gurneyalex:17.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.
```
@OCA-git-bot
Copy link
Contributor

Hi @guewen,
some modules you are maintaining are being modified, check this out!

@gurneyalex
Copy link
Member Author

backport of #898

@gurneyalex gurneyalex added this to the 17.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

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-902-by-guewen-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4eea8d2 into OCA:17.0 Feb 20, 2026
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 4eea8d2. 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