def test_average(self):
        RatingData.objects.add(self.product, self.bob, 3)
        RatingData.objects.add(self.product, self.jim, 2)
        RatingData.objects.add(self.product, self.jane, 1)
        
        # The average for the product should be 2
        self.assertEqual(RatingData.objects.average(self.product), 2)
This will test the rating average
dataset/ETHPy150Open callowayproject/django-critic/critic/tests.py/CriticTestCase.test_average