              ]}
          self.new_target_data = {'id': 2, 'name': u'target-2', 'sources': []}
          self.data = [self.target_data, self.new_target_data]
  
      def test_reverse_foreign_key_retrieve(self):
          queryset = ForeignKeyTarget.objects.all()
          serializer = ForeignKeyTargetSerializer(queryset)
          self.assertEquals(serializer.data, self.data)
  
      def test_reverse_foreign_key_create(self):
 
</s> remove         self.assertEquals(serializer.data, self.data)
 </s> add         self.assertEquals(serializer.data, data)

    def test_reverse_foreign_key_retrieve(self):
        self.check_serialized_targets(self.data) </s> remove         self.assertEquals(serializer.data, expected)
 </s> add         self.check_serialized_targets(expected) </s> remove         queryset = ForeignKeyTarget.objects.all()
        serializer = ForeignKeyTargetSerializer(queryset)
 </s> add  </s> remove         serializer = ForeignKeyTargetSerializer(instance, data=data)
        self.assertTrue(serializer.is_valid())
        self.assertEquals(serializer.data, data)
        serializer.save()
 </s> add         self.save_serialized_target(instance, data) </s> remove         serializer = ForeignKeyTargetSerializer(instance, data=data)
        self.assertTrue(serializer.is_valid())
        self.assertEquals(serializer.data, data)
        serializer.save()
 </s> add         self.save_serialized_target(instance, data)
    def save_serialized_target(self, instance, data):
        serializer = ForeignKeyTargetSerializer(instance, data=data)
        self.assertTrue(serializer.is_valid())
        self.assertEquals(serializer.data, data)
        serializer.save()

    def check_serialized_targets(self, data):
              ]}
          self.new_target_data = {'id': 2, 'name': u'target-2', 'sources': []}
          self.data = [self.target_data, self.new_target_data]
  
    def save_serialized_target(self, instance, data):
        serializer = ForeignKeyTargetSerializer(instance, data=data)
        self.assertTrue(serializer.is_valid())
        self.assertEquals(serializer.data, data)
        serializer.save()

    def check_serialized_targets(self, data):
          queryset = ForeignKeyTarget.objects.all()
          serializer = ForeignKeyTargetSerializer(queryset)
          self.assertEquals(serializer.data, self.data)
  
      def test_reverse_foreign_key_create(self):
keep keep keep keep replace keep keep keep keep keep
 Add two functions for more DRY reverse fk tests 
rest_framework/tests/nested_relations.py