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
This commit is contained in:
Pete Zaitcev 2014-08-18 16:51:01 -06:00
parent eedb0d4ab5
commit 309437bb52

View File

@ -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'},