diff options
author | Michael Foord <michael@voidspace.org.uk> | 2012-01-16 02:08:24 +0000 |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2012-01-16 02:08:24 +0000 |
commit | 977ac42b3be69a2052ec7b5ad49516d1cc9a7b33 (patch) | |
tree | 4af1a7080df7ca44622539db2489907d2d9d3ab1 /mock.py | |
parent | cfe4a6496c19cda6eaf1e235f251e054d7333c23 (diff) | |
download | mock-977ac42b3be69a2052ec7b5ad49516d1cc9a7b33.tar.gz |
Doc and docstring update
Diffstat (limited to 'mock.py')
-rw-r--r-- | mock.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1426,11 +1426,15 @@ def _patch_multiple(target, spec=None, create=False, with patch.multiple(settings, FIRST_PATCH='one', SECOND_PATCH='two'): ... - Like `patch` it can be used as a decorator, class decorator or a context + Use `DEFAULT` as the value if you want `patch.multiple` to create + mocks for you. In this case the created mocks are passed into a decorated + function by keyword, and a dictionary is returned when `patch.multiple` is + used as a context manager. + + `patch.multiple` can be used as a decorator, class decorator or a context manager. The arguments `spec`, `spec_set`, `create`, `mocksignature`, `autospec` and `new_callable` have the same meaning as for `patch`. These - arguments will be applied to *all* the patches being done by - `patch.multiple`. + arguments will be applied to *all* patches done by `patch.multiple`. """ if type(target) in (unicode, str): getter = lambda: _importer(target) |