def test_book_rating(self):
        self.assertEqual(BookRating.objects.all().count(), 6)
        self.assertEqual(BookRating.objects.filter(id_book=Book.objects.filter(book_name='Third Book')).count(), 3)
        self.assertEqual(BookRating.objects.filter(id_user=self.the_user1).count(), 3)
        self.assertEqual(BookRating.objects.filter(id_user=self.the_user2).count(), 2)
        self.assertEqual(BookRating.objects.filter(rating=7).count(), 2)

        self.assertEqual(BookRating.objects.filter(id_book=Book.objects.get(book_name='Third Book'),
                                                   id_user=self.the_user1).count(), 1)
        self.assertEqual(BookRating.objects.filter(id_book=Book.objects.get(book_name='Third Book'),
                                                   id_user=self.the_user6).count(), 0)
        self.assertEqual(BookRating.objects.filter(id_book=Book.objects.get(book_name='Fourth Book'),
                                                   id_user=self.the_user1,
                                                   rating=7).count(), 1)