def test_change_rating(self):
        RatingData.objects.add(self.sample, self.bob, 0)
        
        # The method assigned to sample content type allows changes.
        self.assertTrue(RatingData.objects.add(self.sample, self.bob, 1))
        
        # The first time we add a rating to product, everything should be ok.
        self.assertTrue(RatingData.objects.add(self.product, self.bob, 1))
        
        # The method assigned to product content type does not allow changes.
        self.assertFalse(RatingData.objects.add(self.product, self.bob, 2))
Delete an ImageMember object
dataset/ETHPy150Open callowayproject/django-critic/critic/tests.py/CriticTestCase.test_change_rating--crossover with--dataset/ETHPy150Open rcbops/glance-buildpackage/glance/registry/db/api.py/image_member_delete