9463: Commit old arv-put command back, as the new one still have some performance...
[arvados.git] / sdk / python / tests / manifest_examples.py
1 import arvados
2 import arvados_testutil as tutil
3
4 class ManifestExamples(object):
5     def make_manifest(self,
6                       bytes_per_block=1,
7                       blocks_per_file=1,
8                       files_per_stream=1,
9                       streams=1):
10         datablip = 'x' * bytes_per_block
11         data_loc = tutil.str_keep_locator(datablip)
12         with tutil.mock_keep_responses(data_loc, 200):
13             coll = arvados.CollectionWriter()
14             for si in range(0, streams):
15                 for fi in range(0, files_per_stream):
16                     with coll.open("stream{}/file{}.txt".format(si, fi)) as f:
17                         for bi in range(0, blocks_per_file):
18                             f.write(datablip)
19             return coll.manifest_text()