From defbb4a8f390c7de73ac6a90fc1ab5009e8105ee Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Thu, 15 Oct 2020 14:05:28 -0700 Subject: Allow tempurl times to have units Specifically, let users add a suffix for seconds, minutes, hours, or days. Change-Id: Ibbe7e5aa8aa8e54935da76109c2ea13fb83bc7ab --- test/unit/test_shell.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/unit/test_shell.py') diff --git a/test/unit/test_shell.py b/test/unit/test_shell.py index 8254388..80c031e 100644 --- a/test/unit/test_shell.py +++ b/test/unit/test_shell.py @@ -2037,6 +2037,14 @@ class TestShell(unittest.TestCase): '/v1/AUTH_account/c/o', "60", 'secret_key', 'GET', absolute=False, iso8601=False, prefix=False, ip_range=None, digest='sha256') + # sanity check that suffixes will just pass through to utils.py + argv = ["", "tempurl", "GET", "2d", "/v1/AUTH_account/c/o", + "secret_key"] + swiftclient.shell.main(argv) + temp_url.assert_called_with( + '/v1/AUTH_account/c/o', "2d", 'secret_key', 'GET', absolute=False, + iso8601=False, prefix=False, ip_range=None, digest='sha256') + @mock.patch('swiftclient.shell.generate_temp_url', return_value='') def test_temp_url_prefix_based(self, temp_url): argv = ["", "tempurl", "GET", "60", "/v1/AUTH_account/c/", -- cgit v1.2.1