X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c36ec856598f214e340e3335ddd347d131335bf8..4d9a9766999dda4657bce039a1d56a5591201e95:/sdk/python/tests/test_arv_get.py diff --git a/sdk/python/tests/test_arv_get.py b/sdk/python/tests/test_arv_get.py index 73ef2475b9..aefcbd7b22 100644 --- a/sdk/python/tests/test_arv_get.py +++ b/sdk/python/tests/test_arv_get.py @@ -2,16 +2,15 @@ # # SPDX-License-Identifier: Apache-2.0 -from __future__ import absolute_import -from future.utils import listitems import io import logging -import mock import os import re import shutil import tempfile +from unittest import mock + import arvados import arvados.collection as collection import arvados.commands.get as arv_get @@ -51,7 +50,7 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers, }): api = arvados.api() c = collection.Collection(api_client=api) - for path, data in listitems(contents): + for path, data in contents.items(): with c.open(path, 'wb') as f: f.write(data) c.save_new() @@ -88,7 +87,7 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers, def test_get_block(self): # Get raw data using a block locator - blk = re.search(' (acbd18\S+\+A\S+) ', self.col_manifest).group(1) + blk = re.search(r' (acbd18\S+\+A\S+) ', self.col_manifest).group(1) r = self.run_get([blk, '-']) self.assertEqual(0, r) self.assertEqual(b'foo', self.stdout.getvalue())