def test_created_books(self):
        books = Book.objects.all()

        self.assertEqual(books.count(), 7)
        self.assertEqual(books.filter(private_book=True).count(), 2)
        self.assertEqual(books.filter(id_category=self.category1).count(), 4)
        self.assertEqual(books.filter(id_author=self.author1).count(), 3)
        self.assertEqual(books.filter(language=self.language_en).count(), 4)
        self.assertEqual(books.filter(photo=False).count(), 2)
        self.assertEqual(books.filter(who_added=self.the_user1).count(), 3)
        self.assertEqual(books.filter(id_category=self.category2, id_author=self.author2).count(), 1)
        self.assertEqual(books.filter(id_category=self.category1,
                                      id_author=self.author2,
                                      language=self.language_ru,
                                      who_added=self.the_user1).count(), 1)
        self.assertEqual(books.filter(id_category=self.category1,
                                      id_author=self.author2,
                                      language=self.language_ru,
                                      who_added=self.the_user2).count(), 0)
        self.assertEqual(books.filter(blocked_book=True).count(), 3)