def __get_mock_book(self): b = Book() b.id = 1414 b.title = "Title" b.author = "An Author" b.author_uri = "about:none" f = BookFormat() b.formats = [f, f, f] return b
def __get_treasure_island(self): b = Book() b.id = "1" b.title = "Treasure Island" b.author = "Robert Louis Stevenson" return b
def __get_book(self): my_book = Book() my_book.id = 1337 return my_book
def __convert_search_result_to_book(self, books, result): b = Book() b.id, b.title, b.author = result self.__add_formats_to_book(b) books.append(b)