          data = {'id': 1, 'name': u'target-1', 'sources': [1]}
          instance = ManyToManyTarget.objects.get(pk=1)
          serializer = ManyToManyTargetSerializer(instance, data=data)
          self.assertTrue(serializer.is_valid())
          self.assertEquals(serializer.data, data)
          serializer.save()
  
          # Ensure target 1 is updated, and everything else is as expected
          queryset = ManyToManyTarget.objects.all()
          serializer = ManyToManyTargetSerializer(queryset)
 
</s> remove         self.assertEquals(serializer.data, data)
 </s> add  </s> remove         self.assertEquals(serializer.data, data)
 </s> add  </s> remove         # Ensure target 4 is added, and everything else is as expected
 </s> add         # Ensure target 3 is added, and everything else is as expected
          data = {'id': 1, 'name': u'target-1', 'sources': [1]}
          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)
keep keep keep keep replace keep keep keep keep keep
 Don't persist relation changes in ModelSerializer#restore_object() 
rest_framework/tests/relations_pk.py