From 309437bb5255a2205337fb951fc3c6836cfdaabf Mon Sep 17 00:00:00 2001 From: Pete Zaitcev Date: Mon, 18 Aug 2014 16:51:01 -0600 Subject: [PATCH] Do not create an empty directory 'pseudo/' This is a fix-up for the commit 3d56b65c. The code change was good, but the additional test had a side effect of creating an empty directory "pseudo/". Fix this by mocking-out mkdirs(). Change-Id: Iead55e72d8a75d96bde0a7491aca12bbdcc269cf --- tests/unit/test_shell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_shell.py b/tests/unit/test_shell.py index 46a43ada..eb979a7a 100644 --- a/tests/unit/test_shell.py +++ b/tests/unit/test_shell.py @@ -173,8 +173,9 @@ class TestShell(unittest.TestCase): mock.call(' 0')] mock_print.assert_has_calls(calls) + @mock.patch('swiftclient.shell.makedirs') @mock.patch('swiftclient.shell.Connection') - def test_download(self, connection): + def test_download(self, connection, makedirs): connection.return_value.get_object.return_value = [ {'content-type': 'text/plain', 'etag': 'd41d8cd98f00b204e9800998ecf8427e'},