def testComputeEndByteNoChunks(self): total_size = 100 download = transfer.Download.FromStream( six.StringIO(), chunksize=10, total_size=total_size) for end in (None, 1000): self.assertEqual( total_size - 1, download._Download__ComputeEndByte(0, end=end, use_chunks=False), msg='Failed on end={0}'.format(end))