summaryrefslogtreecommitdiff
path: root/test/unit/test_shell.py
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2020-10-15 14:05:28 -0700
committerTim Burke <tim.burke@gmail.com>2022-08-19 17:40:10 -0700
commitdefbb4a8f390c7de73ac6a90fc1ab5009e8105ee (patch)
tree53844949e13846163414cd6f9f21c312c01da6e3 /test/unit/test_shell.py
parent7f2649bfb717f0f1cc077c04e206841581d6dab5 (diff)
downloadpython-swiftclient-defbb4a8f390c7de73ac6a90fc1ab5009e8105ee.tar.gz
Allow tempurl times to have units
Specifically, let users add a suffix for seconds, minutes, hours, or days. Change-Id: Ibbe7e5aa8aa8e54935da76109c2ea13fb83bc7ab
Diffstat (limited to 'test/unit/test_shell.py')
-rw-r--r--test/unit/test_shell.py8
1 files changed, 8 insertions, 0 deletions
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/",