From 663ecd5eb1d3610793f93a72f36a07f0b8adecb0 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Tue, 24 Apr 2018 08:42:10 +0100 Subject: Revert "docker-source: Support blobs without .tar ext" This reverts commit 6146e9ab5e36ff894b8c95d00a45db6181ad8472. --- tests/docker_source.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/docker_source.py b/tests/docker_source.py index 204f945..ba6f930 100644 --- a/tests/docker_source.py +++ b/tests/docker_source.py @@ -335,12 +335,9 @@ class TestDockerSource(unittest.TestCase): } manifest = {'schemaVersion': 2, 'Layers': ['sha256:a7050fc1']} - - with mock.patch('os.path.isfile') as m_isfile: - m_isfile.return_value = True - result = self._mock_retrieve_layers_info(manifest, src_kwargs) - - src_instance, m_uri, m_utils = result + (src_instance, + m_uri, m_utils) = self._mock_retrieve_layers_info(manifest, + src_kwargs) kwargs = { 'insecure': src_instance.insecure, @@ -376,9 +373,7 @@ class TestDockerSource(unittest.TestCase): ['/images_path/75c416ea.tar', None] ] - with mock.patch('os.path.getsize') as m_getsize, \ - mock.patch('os.path.isfile') as m_isfile: + with mock.patch('os.path.getsize') as m_getsize: m_getsize.return_value = None - m_isfile.side_effect = lambda x: x.endswith(".tar") src_instance = self._mock_retrieve_layers_info(manifest, kwargs)[0] self.assertEqual(src_instance.layers, expected_result) -- cgit