We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7295065 commit 9c8c3d4Copy full SHA for 9c8c3d4
README.rst
@@ -60,6 +60,14 @@ The supported methods are:
60
* ``mocker.patch.dict``: see http://www.voidspace.org.uk/python/mock/patch.html#patch-dict.
61
* ``mocker.stopall()``: stops all active patches at this point.
62
63
+You can also access ``Mock`` and ``MagicMock`` directly using from ``mocker``
64
+fixture:
65
+
66
+.. code-block:: python
67
68
+ def test_feature(mocker):
69
+ ret = [mocker.Mock(return_value=True), mocker.Mock(return_value=True)]
70
+ mocker.patch('mylib.func', side_effect=ret)
71
72
Note
73
----
setup.py
@@ -9,7 +9,7 @@
9
10
setup(
11
name='pytest-mock',
12
- version='0.4.3',
+ version='0.5.0',
13
entry_points={
14
'pytest11': ['pytest_mock = pytest_mock'],
15
},
0 commit comments