def test_user_rating(self):
        RatingData.objects.add(self.sample, self.bob, 1)
        
        self.assertEqual(RatingData.objects.user_rating(self.sample, 
            self.bob), 1)
        
        self.assertNotEqual(RatingData.objects.user_rating(self.sample, 
            self.bob), 0)
This will test retrieving the user rating
dataset/ETHPy150Open callowayproject/django-critic/critic/tests.py/CriticTestCase.test_user_rating