          fields = ('name', 'age', 'info')
          read_only_fields = ('age',)
  
  
  class PersonSerializerInvalidReadOnly(serializers.ModelSerializer):
      """
      Testing for #652.
      """
 
</s> remove                 # Propagate errors up to our parent
                raise NestedValidationError(serializer.errors)
 </s> add                 kwargs = {
                    'instance': obj,
                    'data': value,
                    'context': self.context,
                    'partial': self.partial,
                    'many': self.many
                }
                serializer = self.__class__(**kwargs)

                if serializer.is_valid():
                    into[self.source or field_name] = serializer.object
                else:
                    # Propagate errors up to our parent
                    raise NestedValidationError(serializer.errors) </s> remove             kwargs = {
                'instance': obj,
                'data': value,
                'context': self.context,
                'partial': self.partial,
                'many': self.many
            }
            serializer = self.__class__(**kwargs)

            if serializer.is_valid():
                into[self.source or field_name] = serializer.object
 </s> add             if value in (None, ''):
                into[(self.source or field_name)] = None </s> remove         if value in (None, ''):
            into[(self.source or field_name)] = None
 </s> add         if self.source == '*':
            if value:
                into.update(value)
class NestedSerializer(serializers.Serializer):
    info = serializers.Field()


class ModelSerializerWithNestedSerializer(serializers.ModelSerializer):
    nested = NestedSerializer(source='*')

    class Meta:
        model = Person


          fields = ('name', 'age', 'info')
          read_only_fields = ('age',)
  
  
class NestedSerializer(serializers.Serializer):
    info = serializers.Field()


class ModelSerializerWithNestedSerializer(serializers.ModelSerializer):
    nested = NestedSerializer(source='*')

    class Meta:
        model = Person


  class PersonSerializerInvalidReadOnly(serializers.ModelSerializer):
      """
      Testing for #652.
      """
keep keep keep add keep keep keep keep
 when source='*' on a nested serializer, expand fields into outer serializer when writing. fixes #765 
rest_framework/tests/serializer.py