def test_transfer_uploads_to_s3(self, m3: Mock, m2: Mock, m1: Mock) -> None: transfer_uploads_to_s3(4) m1.assert_called_with(4) m2.assert_called_with(4) m3.assert_called_with(4)
def handle(self, *args: Any, **options: Any) -> None: num_processes = int(options['processes']) if num_processes < 1: raise CommandError('You must have at least one process.') if not settings.LOCAL_UPLOADS_DIR: raise CommandError('Please set the value of LOCAL_UPLOADS_DIR.') transfer_uploads_to_s3(num_processes) print("Transfer to S3 completed successfully.")