diff options
Diffstat (limited to 'tests/unit/test_shell.py')
-rw-r--r-- | tests/unit/test_shell.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/test_shell.py b/tests/unit/test_shell.py index 0c28297..33cc91a 100644 --- a/tests/unit/test_shell.py +++ b/tests/unit/test_shell.py @@ -22,6 +22,7 @@ import six import swiftclient import swiftclient.shell +import swiftclient.utils if six.PY2: @@ -328,6 +329,16 @@ class TestShell(unittest.TestCase): 'Content-Type': 'text/plain', 'X-Object-Meta-Color': 'Blue'}) + @mock.patch('swiftclient.shell.generate_temp_url') + def test_temp_url(self, temp_url): + argv = ["", "tempurl", "GET", "60", "/v1/AUTH_account/c/o", + "secret_key" + ] + temp_url.return_value = "" + swiftclient.shell.main(argv) + temp_url.assert_called_with( + '/v1/AUTH_account/c/o', 60, 'secret_key', 'GET') + @mock.patch('swiftclient.shell.Connection') def test_capabilities(self, connection): argv = ["", "capabilities"] |