transfer_test_10.py 425 B

123456789101112
  1. def testChunkedDownload(self):
  2. bytes_http = object()
  3. http = object()
  4. download_stream = six.StringIO()
  5. download = transfer.Download.FromStream(
  6. download_stream, chunksize=26, total_size=52)
  7. download.bytes_http = bytes_http
  8. # Setting autospec on a mock with an iterable side_effect is
  9. # currently broken (http://bugs.python.org/issue17826), so
  10. # instead we write a little function.