diff options
author | Pete Zaitcev <zaitcev@kotori.zaitcev.us> | 2014-08-18 16:51:01 -0600 |
---|---|---|
committer | Pete Zaitcev <zaitcev@kotori.zaitcev.us> | 2014-08-18 16:51:01 -0600 |
commit | 309437bb5255a2205337fb951fc3c6836cfdaabf (patch) | |
tree | f48c9761e2479c679cf3d087ff7ff2ea6c0a059a | |
parent | eedb0d4ab5f2fc6ac8b49a80cd2128edcbc5aceb (diff) | |
download | python-swiftclient-309437bb5255a2205337fb951fc3c6836cfdaabf.tar.gz |
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
-rw-r--r-- | tests/unit/test_shell.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/test_shell.py b/tests/unit/test_shell.py index 46a43ad..eb979a7 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'}, |