def publisher(self): """ Get the publisher. Returns: str """ return clean_field(self.record.publisher())
def date(self): """ Get the date. Returns: str """ return clean_field(self.record.pubyear())
def control_number(self): """ Get the control number. Returns: str """ return clean_field(self.record['001'].format_field())
def title(self): """ Get the title. Returns: str """ return clean_field(self.record.title())
def surname(self): """ Extract a surname. Returns: surname """ author = clean_field(self.record.author()) return author.split(',')[0] if author else None
def authors(self): """ Get the author array. Returns: list """ author = clean_field(self.record.author()) return [author] if author else []
def test_clean_field(raw, clean, mock_hlom): assert clean_field(raw) == clean