def METHOD_NAME(self) -> None:
    self._stream_config.schemaless = False
    self._validation_policy.record_passes_validation_policy.return_value = False
    self._parser.parse_records.side_effect = [self._iter([self._A_RECORD, ValueError("An error")])]
    messages = list(self._stream.read_records_from_slice({"files": [
        RemoteFile(uri="invalid_file", last_modified=self._NOW),
        RemoteFile(uri="valid_file", last_modified=self._NOW),
    ]}))
    assert messages[0].log.level == Level.ERROR
    assert messages[1].log.level == Level.WARN