def test_multi_upload():
 group = worker.WalTransferGroup(FakeWalUploader())
 segments = list(prepare_multi_upload_segments())
 for seg in segments:
  group.start(seg)
 group.join()
 for seg in segments:
  assert success(seg)

def test_multi_upload ( ) : group = worker . WalTransferGroup ( FakeWalUploader ( ) ) segments = list ( prepare_multi_upload_segments ( ) ) for seg in segments : group . start ( seg ) group . join ( ) for seg in segments : assert success ( seg )
model a case with upload concurrency .