          instance = ManyToManyTarget.objects.get(pk=1)
          serializer = ManyToManyTargetSerializer(instance, data=data)
          self.assertTrue(serializer.is_valid())
          serializer.save()
  
          # Ensure target 1 is updated, and everything else is as expected
          queryset = ManyToManyTarget.objects.all()
          serializer = ManyToManyTargetSerializer(queryset)
          expected = [
 
</s> remove         self.assertEquals(serializer.data, data)
 </s> add  </s> remove         self.assertEquals(serializer.data, data)
 </s> add  </s> remove         self.assertEquals(serializer.data, data)
 </s> add 
        self.assertEquals(serializer.data, data)
          instance = ManyToManyTarget.objects.get(pk=1)
          serializer = ManyToManyTargetSerializer(instance, data=data)
          self.assertTrue(serializer.is_valid())
          serializer.save()
        self.assertEquals(serializer.data, data)
  
          # Ensure target 1 is updated, and everything else is as expected
          queryset = ManyToManyTarget.objects.all()
          serializer = ManyToManyTargetSerializer(queryset)
          expected = [
keep keep keep add keep keep keep keep keep
 Don't persist relation changes in ModelSerializer#restore_object() 
rest_framework/tests/relations_hyperlink.py