def assert_download_progress(self, size, max_chunk_size, max_get_size, progress, single_download=False):
if size <= max_get_size or single_download:<EOL><INDENT>self.assertEqual(len(progress), <NUM_LIT:1>)<EOL>self.assertTrue(progress[<NUM_LIT:0>][<NUM_LIT:0>], size)<EOL>self.assertTrue(progress[<NUM_LIT:0>][<NUM_LIT:1>], size)<EOL><DEDENT>else:<EOL><INDENT>small_chunk_size = (size - max_get_size) % max_chunk_size<EOL>self.assertEqual(len(progress), <NUM_LIT:1> + math.ceil((size - max_get_size) / max_chunk_size))<EOL>self.assertTrue(progress[<NUM_LIT:0>][<NUM_LIT:0>], max_get_size)<EOL>self.assertTrue(progress[<NUM_LIT:0>][<NUM_LIT:1>], size)<EOL>for i in progress[<NUM_LIT:1>:]:<EOL><INDENT>self.assertTrue(i[<NUM_LIT:0>] % max_chunk_size == <NUM_LIT:0> or i[<NUM_LIT:0>] % max_chunk_size == small_chunk_size)<EOL>self.assertEqual(i[<NUM_LIT:1>], size)<EOL><DEDENT><DEDENT>
Validates that the progress chunks align with our chunking procedure.