summaryrefslogtreecommitdiff
path: root/mock.py
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2012-01-16 02:08:24 +0000
committerMichael Foord <michael@voidspace.org.uk>2012-01-16 02:08:24 +0000
commit977ac42b3be69a2052ec7b5ad49516d1cc9a7b33 (patch)
tree4af1a7080df7ca44622539db2489907d2d9d3ab1 /mock.py
parentcfe4a6496c19cda6eaf1e235f251e054d7333c23 (diff)
downloadmock-977ac42b3be69a2052ec7b5ad49516d1cc9a7b33.tar.gz
Doc and docstring update
Diffstat (limited to 'mock.py')
-rw-r--r--mock.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/mock.py b/mock.py
index c7e0dc3..f56bc8d 100644
--- a/mock.py
+++ b/mock.py
@@ -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)