def test_generate_existing_books(self):
        """
        Must generate list of dicts with Books data depending on different criteria and excluding private books.
        """
        self.assertTrue(isinstance(Book.generate_existing_books('book'), list))
        self.assertEqual(len(Book.generate_existing_books('book')), 5)
        self.assertEqual(len(Book.generate_existing_books('Book')), 5)
        self.assertEqual(len(Book.generate_existing_books('bOoK')), 5)

        fourth_book = Book.objects.get(book_name='Fourth Book')
        test_book = Book.generate_existing_books('fourth')

        self.assertEqual(len(test_book), 1)
        self.assertTrue(isinstance(test_book[0], dict))
        self.assertEqual(test_book[0], {'url': reverse('book', args=[fourth_book.id]),
                                        'name': fourth_book.book_name})

        test_private_book = Book.generate_existing_books('fifth')

        self.assertEqual(len(test_private_book), 0)