From 2e6b7d7c9a0ee17d3e47262ecd0d5a887ed2b177 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Tue, 10 Apr 2018 16:04:35 +0100 Subject: tests: docker_source: Mock out is_installed() Commit b38f588 (source-docker: Show error if skopeo not installed) introduced a check used by Docker-souce to verify that skopeo is installed. However, the unit test cases in TestDockerSource do not aim to ensure that skopeo is installed and therefore this check is redundant. Signed-off-by: Radostin Stoyanov --- tests/docker_source.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/docker_source.py') diff --git a/tests/docker_source.py b/tests/docker_source.py index a921bb8..7f3c783 100644 --- a/tests/docker_source.py +++ b/tests/docker_source.py @@ -317,10 +317,12 @@ class TestDockerSource(unittest.TestCase): """ with mock.patch.multiple('virtBootstrap.utils', get_image_details=mock.DEFAULT, + is_installed=mock.DEFAULT, get_image_dir=mock.DEFAULT) as m_utils: m_utils['get_image_details'].return_value = manifest m_utils['get_image_dir'].return_value = '/images_path' + m_utils['is_installed'].return_value = True patch_method = 'virtBootstrap.sources.DockerSource.gen_valid_uri' with mock.patch(patch_method) as m_uri: -- cgit