diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fdca16a..e9d30b7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ Releases ======== +3.9.0 (2022-09-28) +------------------ + +* Expose ``NonCallableMagicMock`` via the ``mocker`` fixture (`#318`_). + +.. _#318: https://github.com/pytest-dev/pytest-mock/pull/318 + 3.8.2 (2022-07-05) ------------------ diff --git a/src/pytest_mock/plugin.py b/src/pytest_mock/plugin.py index 0d9b95b..9554750 100644 --- a/src/pytest_mock/plugin.py +++ b/src/pytest_mock/plugin.py @@ -54,6 +54,7 @@ def __init__(self, config: Any) -> None: self.Mock = mock_module.Mock self.MagicMock = mock_module.MagicMock self.NonCallableMock = mock_module.NonCallableMock + self.NonCallableMagicMock = mock_module.NonCallableMagicMock self.PropertyMock = mock_module.PropertyMock if hasattr(mock_module, "AsyncMock"): self.AsyncMock = mock_module.AsyncMock diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py index 1842d6c..8033475 100644 --- a/tests/test_pytest_mock.py +++ b/tests/test_pytest_mock.py @@ -160,6 +160,7 @@ def test_mock_patch_dict_resetall(mocker: MockerFixture) -> None: "MagicMock", "Mock", "mock_open", + "NonCallableMagicMock", "NonCallableMock", "PropertyMock", "sentinel",