=====
:release-date: 2016-07-18 05:33 p.m. PDT
:release-by: Ask Solem
- Case is now a py.test plug-in and provides a `patching` fixture
as a shortcut to `monkeypatch` setting the value to a mock.
This does not have any effects for users not using py.test.
Example:
.. code-block:: python
def test_foo(patching):
execv value here will be mock.MagicMock by default.
execv = patching('os.execv')
patching('sys.platform', 'darwin') set concrete value
patching.setenv('DJANGO_SETTINGS_MODULE', 'x.settings')
val will be of type mock.MagicMock by default
val = patching.setitem('path.to.dict', 'KEY')
.. _version-1.2.3: