diff options
author | Michael Foord <michael@voidspace.org.uk> | 2011-12-30 15:09:56 +0000 |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2011-12-30 15:09:56 +0000 |
commit | f1750e45ba1a0e98151bd77d73b04d51e22e3c7b (patch) | |
tree | 169e224bd44ac6d3eb4b9bbafa587dceff392782 /mock.py | |
parent | 7bd3d2576985b00620fbd79a2624a9313d98b80b (diff) | |
download | mock-f1750e45ba1a0e98151bd77d73b04d51e22e3c7b.tar.gz |
return_value (etc) arguments to patch work with autospec (again)
Diffstat (limited to 'mock.py')
-rw-r--r-- | mock.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |