projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20318: Merge branch 'main' into 20318-disk-cache
[arvados.git]
/
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 733cd6478c155131f9f29f4b3e7adedf6fa0508e..d12739f6f69235defbfccdf0ab1701a89e6bb8a4 100644
(file)
--- a/
sdk/python/tests/test_arv_get.py
+++ b/
sdk/python/tests/test_arv_get.py
@@
-49,12
+49,15
@@
class ArvadosGetTestCase(run_test_server.TestCaseWithServers,
'bar.txt' : 'bar',
'subdir/baz.txt' : 'baz',
}):
'bar.txt' : 'bar',
'subdir/baz.txt' : 'baz',
}):
- c = collection.Collection()
+ api = arvados.api()
+ c = collection.Collection(api_client=api)
for path, data in listitems(contents):
with c.open(path, 'wb') as f:
f.write(data)
c.save_new()
for path, data in listitems(contents):
with c.open(path, 'wb') as f:
f.write(data)
c.save_new()
+ api.close_connections()
+
return (c.manifest_locator(),
c.portable_data_hash(),
c.manifest_text(strip=strip_manifest))
return (c.manifest_locator(),
c.portable_data_hash(),
c.manifest_text(strip=strip_manifest))
@@
-85,7
+88,7
@@
class ArvadosGetTestCase(run_test_server.TestCaseWithServers,
def test_get_block(self):
# Get raw data using a block locator
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())
r = self.run_get([blk, '-'])
self.assertEqual(0, r)
self.assertEqual(b'foo', self.stdout.getvalue())