diff --git a/README.rst b/README.rst index 3fb8143..0bb4ca0 100644 --- a/README.rst +++ b/README.rst @@ -60,6 +60,14 @@ The supported methods are: * ``mocker.patch.dict``: see http://www.voidspace.org.uk/python/mock/patch.html#patch-dict. * ``mocker.stopall()``: stops all active patches at this point. +You can also access ``Mock`` and ``MagicMock`` directly using from ``mocker`` +fixture: + +.. code-block:: python + + def test_feature(mocker): + ret = [mocker.Mock(return_value=True), mocker.Mock(return_value=True)] + mocker.patch('mylib.func', side_effect=ret) Note ---- diff --git a/setup.py b/setup.py index f8cd67d..cfd8109 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='pytest-mock', - version='0.4.3', + version='0.5.0', entry_points={ 'pytest11': ['pytest_mock = pytest_mock'], },