diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-23 15:52:13 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-23 15:52:13 -0700 |
commit | c3bec04485ad2d9b448e79e4a8d58f59502fbaf1 (patch) | |
tree | 41b681c5ec48c57fe74d0d6ee47138c2b573734d | |
parent | 1893cbec881003d322ed2613542c09865310eabe (diff) | |
download | python-swiftclient-c3bec04485ad2d9b448e79e4a8d58f59502fbaf1.tar.gz |
Fixed several shell tests on Python3.
They currently fail because on Python3 arbitrary objects cannot be compared, in
this case, MagicMock and int. In Python2 these comparisons silently pass.
Change-Id: I468c2137702a454365886099e827d329cb1d7209
-rw-r--r-- | tests/test_shell.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_shell.py b/tests/test_shell.py index 55967b6..178d018 100644 --- a/tests/test_shell.py +++ b/tests/test_shell.py @@ -177,6 +177,7 @@ class TestShell(unittest.TestCase): [None, [{'name': 'object'}]], [None, []], ] + connection.return_value.attempts = 0 argv = ["", "download", "container"] swiftclient.shell.main(argv) @@ -194,6 +195,7 @@ class TestShell(unittest.TestCase): def test_upload(self, connection, listdir): connection.return_value.head_object.return_value = { 'content-length': '0'} + connection.return_value.attempts = 0 argv = ["", "upload", "container", self.tmpfile] swiftclient.shell.main(argv) connection.return_value.put_object.assert_called_with( @@ -237,6 +239,7 @@ class TestShell(unittest.TestCase): [None, [{'name': 'object'}]], [None, []], ] + connection.return_value.attempts = 0 argv = ["", "delete", "--all"] connection.return_value.head_object.return_value = {} swiftclient.shell.main(argv) @@ -251,6 +254,7 @@ class TestShell(unittest.TestCase): [None, [{'name': 'object'}]], [None, []], ] + connection.return_value.attempts = 0 argv = ["", "delete", "container"] connection.return_value.head_object.return_value = {} swiftclient.shell.main(argv) @@ -263,6 +267,7 @@ class TestShell(unittest.TestCase): def test_delete_object(self, connection): argv = ["", "delete", "container", "object"] connection.return_value.head_object.return_value = {} + connection.return_value.attempts = 0 swiftclient.shell.main(argv) connection.return_value.delete_object.assert_called_with( 'container', 'object', query_string=None) |