Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 def create(self, filepath):
     """Load the given file. Return a book object."""
     p = Pdf(filepath)
     b = Book()
     try:
         p.load()
         b.title = p.title
         b.author = p.author
         self.__add_format(b, filepath)
     except FileNotFoundError:
         b = None
     return b
Ejemplo n.º 3
0
 def __get_treasure_island(self):
     b = Book()
     b.id = "1"
     b.title = "Treasure Island"
     b.author = "Robert Louis Stevenson"
     return b
Ejemplo n.º 4
0
 def __get_treasure_sland():
     b = Book()
     b.author = "Robert Louis Stevenson"
     b.title = "Treasure Island"
     return b