summaryrefslogtreecommitdiff
authorDustin Frisch <fooker@lab.sh>2014-11-19 17:48:12 (GMT)
committer Dustin Frisch <fooker@lab.sh>2014-11-19 17:48:12 (GMT)
commitb76dfdb6c86fa9437c3f60a18da23b7682eabeaf (patch) (side-by-side diff)
treef4f6e335edc555e07217317fffb0ae481ab7e8d7
parente730a26776c832e031879d2ce4954617c30d40cd (diff)
downloadrequire-master.zip
require-master.tar.gz
Allow mocking to specify return value of factory functionHEADmaster
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--require/mock.py2
-rw-r--r--setup.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/require/mock.py b/require/mock.py
index 2402159..3aa539a 100644
--- a/require/mock.py
+++ b/require/mock.py
@@ -54,7 +54,7 @@ def mock(requirement):
with unittest.mock.patch.object(export, 'create',
unittest.mock.Mock(name='mocked:%s' % requirement)) as mocked:
# Modify the mocked factory function
- mocker(mocked.return_value)
+ mocker(mocked)
# Call the wrapped function with the patch in place
return func(*args, **kwargs)
diff --git a/setup.py b/setup.py
index 43685b8..e403c1b 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ setuptools.setup(
license = 'GNU GPLv3',
name = 'require',
- version = '0.1.0',
+ version = '0.1.1',
author = 'Dustin Frisch',
author_email = 'fooker@lab.sh',