Skip to content

Commit 1ff24c9

Browse files
author
Mathieu Leduc-Hamel
committed
Adds support for NonCallableMock
1 parent 680d4ee commit 1ff24c9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pytest_mock.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def __init__(self, config):
4848
# aliases for convenience
4949
self.Mock = mock_module.Mock
5050
self.MagicMock = mock_module.MagicMock
51+
self.NonCallableMock = mock_module.NonCallableMock
5152
self.PropertyMock = mock_module.PropertyMock
5253
self.call = mock_module.call
5354
self.ANY = mock_module.ANY

test_pytest_mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def test_deprecated_mock(mock, tmpdir):
137137
assert os.listdir(str(tmpdir)) == []
138138

139139

140-
@pytest.mark.parametrize('name', ['MagicMock', 'PropertyMock', 'Mock', 'call', 'ANY', 'sentinel', 'mock_open'])
140+
@pytest.mark.parametrize('name', ['MagicMock', 'NonCallableMock', 'PropertyMock', 'Mock', 'call', 'ANY', 'sentinel', 'mock_open'])
141141
def test_mocker_aliases(name, pytestconfig):
142142
from pytest_mock import _get_mock_module, MockFixture
143143

0 commit comments

Comments
 (0)