def assert_upload_progress(self, size, max_chunk_size, progress, unknown_size=False):
index = <NUM_LIT:0><EOL>total = None if unknown_size else size<EOL>small_chunk_size = size % max_chunk_size<EOL>self.assertEqual(len(progress), <NUM_LIT:1> + math.ceil(size / max_chunk_size))<EOL>for i in progress:<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>], total)<EOL><DEDENT>
Validates that the progress chunks align with our chunking procedure.