X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d6cccb3ea4e5f076a436d9935e3835d4b620b859..e2267bd99209651c61425f335230e515421b2ef4:/sdk/cwl/tests/test_http.py diff --git a/sdk/cwl/tests/test_http.py b/sdk/cwl/tests/test_http.py index 34f2bbb9d7..650b5f0598 100644 --- a/sdk/cwl/tests/test_http.py +++ b/sdk/cwl/tests/test_http.py @@ -1,9 +1,10 @@ -from future import standard_library -standard_library.install_aliases() # Copyright (C) The Arvados Authors. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 +from future import standard_library +standard_library.install_aliases() + import copy import io import functools @@ -59,8 +60,8 @@ class TestHttpToKeep(unittest.TestCase): getmock.assert_called_with("http://example.com/file1.txt", stream=True, allow_redirects=True) - cm.open.assert_called_with("file1.txt", "w") - cm.save_new.assert_called_with(name="Downloaded from http://example.com/file1.txt", + cm.open.assert_called_with("file1.txt", "wb") + cm.save_new.assert_called_with(name="Downloaded from http%3A%2F%2Fexample.com%2Ffile1.txt", owner_uuid=None, ensure_unique_name=True) api.collections().update.assert_has_calls([ @@ -187,8 +188,8 @@ class TestHttpToKeep(unittest.TestCase): getmock.assert_called_with("http://example.com/file1.txt", stream=True, allow_redirects=True) - cm.open.assert_called_with("file1.txt", "w") - cm.save_new.assert_called_with(name="Downloaded from http://example.com/file1.txt", + cm.open.assert_called_with("file1.txt", "wb") + cm.save_new.assert_called_with(name="Downloaded from http%3A%2F%2Fexample.com%2Ffile1.txt", owner_uuid=None, ensure_unique_name=True) api.collections().update.assert_has_calls([ @@ -278,8 +279,8 @@ class TestHttpToKeep(unittest.TestCase): getmock.assert_called_with("http://example.com/download?fn=/file1.txt", stream=True, allow_redirects=True) - cm.open.assert_called_with("file1.txt", "w") - cm.save_new.assert_called_with(name="Downloaded from http://example.com/download?fn=/file1.txt", + cm.open.assert_called_with("file1.txt", "wb") + cm.save_new.assert_called_with(name="Downloaded from http%3A%2F%2Fexample.com%2Fdownload%3Ffn%3D%2Ffile1.txt", owner_uuid=None, ensure_unique_name=True) api.collections().update.assert_has_calls([