diff options
| author | Zuul <zuul@review.openstack.org> | 2018-01-02 22:51:25 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2018-01-02 22:51:25 +0000 |
| commit | cf62e1635d6ca6b025829e8bbf6294cb8a1fd982 (patch) | |
| tree | ae33bb4946796546a37f5e75016f1579c865585d /glanceclient/tests/unit/v2 | |
| parent | 11ac1e2eb32c4965fa4fe8d7023f006432c3917b (diff) | |
| parent | 4dcbc30e317a25495bebc073bb9913d9fd9d43a2 (diff) | |
| download | python-glanceclient-2.9.0.tar.gz | |
Merge "Compare against 'RequestIdProxy.wrapped'"2.9.0
Diffstat (limited to 'glanceclient/tests/unit/v2')
| -rw-r--r-- | glanceclient/tests/unit/v2/test_shell_v2.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/glanceclient/tests/unit/v2/test_shell_v2.py b/glanceclient/tests/unit/v2/test_shell_v2.py index 4ac8c17..d75613f 100644 --- a/glanceclient/tests/unit/v2/test_shell_v2.py +++ b/glanceclient/tests/unit/v2/test_shell_v2.py @@ -581,11 +581,10 @@ class ShellV2Test(testtools.TestCase): args = self._make_args( {'id': 'IMG-01', 'file': 'test', 'progress': True}) - with mock.patch.object(self.gc.images, 'data') as mocked_data: - def _data(): - for c in 'abcedf': - yield c - mocked_data.return_value = utils.IterableWithLength(_data(), 5) + with mock.patch.object(self.gc.images, 'data') as mocked_data, \ + mock.patch.object(utils, '_extract_request_id'): + mocked_data.return_value = utils.RequestIdProxy( + [c for c in 'abcdef']) test_shell.do_image_download(self.gc, args) mocked_data.assert_called_once_with('IMG-01') |
