def test_generate_books(self):
        """
        Must generate correct dictionaries for Book data.
        """
        books = Book.objects.all()

        self.assertTrue(isinstance(Book.generate_books(books), list))
        self.assertEqual(len(Book.generate_books(books)), 7)
        self.assertEqual(len(Book.generate_books(books)[0].keys()), 5)
        self.assertEqual(Book.generate_books(books)[0], Utils.generate_sort_dict(books[0]))
        self.assertEqual(Book.generate_books(books)[6], Utils.generate_sort_dict(books[6]))