summaryrefslogtreecommitdiff
path: root/mock.py
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2011-12-30 15:09:56 +0000
committerMichael Foord <michael@voidspace.org.uk>2011-12-30 15:09:56 +0000
commitf1750e45ba1a0e98151bd77d73b04d51e22e3c7b (patch)
tree169e224bd44ac6d3eb4b9bbafa587dceff392782 /mock.py
parent7bd3d2576985b00620fbd79a2624a9313d98b80b (diff)
downloadmock-f1750e45ba1a0e98151bd77d73b04d51e22e3c7b.tar.gz
return_value (etc) arguments to patch work with autospec (again)
Diffstat (limited to 'mock.py')
-rw-r--r--mock.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mock.py b/mock.py
index 2a83669..cc9922d 100644
--- a/mock.py
+++ b/mock.py
@@ -1321,8 +1321,9 @@ class _patch(object):
spec_set = bool(spec_set)
if autospec is True:
autospec = original
- new = create_autospec(autospec, spec_set=spec_set, configure=kwargs,
- _name=self.attribute)
+
+ new = create_autospec(autospec, spec_set=spec_set,
+ _name=self.attribute, **kwargs)
elif kwargs:
# can't set keyword args when we aren't creating the mock
# XXXX If new is a Mock we could call new.configure_mock(**kwargs)