Lines Matching refs:download
435 download = MediaIoBaseDownload(
438 self.assertEqual(self.fd, download._fd)
439 self.assertEqual(3, download._chunksize)
440 self.assertEqual(0, download._progress)
441 self.assertEqual(None, download._total_size)
442 self.assertEqual(False, download._done)
443 self.assertEqual(self.request.uri, download._uri)
445 status, done = download.next_chunk()
449 self.assertEqual(3, download._progress)
450 self.assertEqual(5, download._total_size)
453 status, done = download.next_chunk()
457 self.assertEqual(5, download._progress)
458 self.assertEqual(5, download._total_size)
471 download = MediaIoBaseDownload(
474 self.assertEqual(download._headers, {'Cache-Control':'no-store'})
476 status, done = download.next_chunk()
488 download._fd = self.fd = BytesIO()
489 status, done = download.next_chunk()
503 download = MediaIoBaseDownload(
506 status, done = download.next_chunk()
508 self.assertEqual('https://secure.example.net/lion', download._uri)
515 download = MediaIoBaseDownload(
519 status, done = download.next_chunk()
530 status, done = download.next_chunk()
538 download = MediaIoBaseDownload(
540 download._sleep = lambda _x: 0 # do nothing
541 download._rand = lambda: 10
543 status, done = download.next_chunk(num_retries=4)
562 download = MediaIoBaseDownload(
565 self.assertEqual(self.fd, download._fd)
566 self.assertEqual(3, download._chunksize)
567 self.assertEqual(0, download._progress)
568 self.assertEqual(None, download._total_size)
569 self.assertEqual(False, download._done)
570 self.assertEqual(self.request.uri, download._uri)
574 download._sleep = lambda x: sleeptimes.append(x)
575 download._rand = lambda: 10
577 status, done = download.next_chunk(num_retries=3)
584 self.assertEqual(3, download._progress)
585 self.assertEqual(5, download._total_size)
591 status, done = download.next_chunk(num_retries=3)
598 self.assertEqual(5, download._progress)
599 self.assertEqual(5, download._total_size)
607 download = MediaIoBaseDownload(
610 self.assertEqual(self.fd, download._fd)
611 self.assertEqual(0, download._progress)
612 self.assertEqual(None, download._total_size)
613 self.assertEqual(False, download._done)
614 self.assertEqual(self.request.uri, download._uri)
616 status, done = download.next_chunk()
619 self.assertEqual(0, download._progress)
620 self.assertEqual(0, download._total_size)
628 download = MediaIoBaseDownload(
631 self.assertEqual(self.fd, download._fd)
632 self.assertEqual(0, download._progress)
633 self.assertEqual(None, download._total_size)
634 self.assertEqual(False, download._done)
635 self.assertEqual(self.request.uri, download._uri)
637 status, done = download.next_chunk()
641 self.assertEqual(3, download._progress)
642 self.assertEqual(None, download._total_size)