Skip to content

Conversation

maxrake
Copy link
Contributor

@maxrake maxrake commented Dec 6, 2023

Description

There are whitelist entries for the return_value and side_effect
attributes of the unittest.mock.Mock class. This change seeks to
provide parity for the unittest.mock.MagicMock class, which is just a
subclass of Mock but with default implementations of most of the magic
methods.

Standard library reference:
https://docs.python.org/3/library/unittest.mock.html#magic-mock

Checklist:

  • I have updated the documentation in the README.md file or my changes don't require an update.
  • I have added an entry in CHANGELOG.md.
  • I have added or adapted tests to cover my changes.
    • No whitelist tests were found to update
  • I have run tox -e fix-style to format my code and checked the result with tox -e style.

There are whitelist entries for the `return_value` and `side_effect`
attributes of the `unittest.mock.Mock` class. This change seeks to
provide parity for the `unittest.mock.MagicMock` class, which is just a
subclass of `Mock` but with default implementations of most of the magic
methods.

Standard library reference:
https://docs.python.org/3/library/unittest.mock.html#magic-mock
@jendrikseipp jendrikseipp merged commit 3d0ad1a into jendrikseipp:main Dec 6, 2023
@jendrikseipp
Copy link
Owner

Thanks!

@maxrake maxrake deleted the whitelist_magicmock branch December 6, 2023 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants