  
  
  class TestStarredSource:
      """
      Tests for `source='*'` argument, which is used for nested representations.
  
      For example:
  
          nested_field = NestedField(source='*')
      """
 
</s> remove         class TestSerializer(serializers.Serializer):
 </s> add         class NestedBaseSerializer(serializers.Serializer): </s> remove         self.Serializer = TestSerializer
 </s> add         # nullable nested serializer testing
        class NullableNestedSerializer(serializers.Serializer):
            nested = NestedSerializer1(source='*', allow_null=True)

        # nullable custom field testing
        class CustomField(serializers.Field):
            def to_representation(self, instance):
                return getattr(instance, 'foo', None)

            def to_internal_value(self, data):
                return {'foo': data}

        class NullableFieldSerializer(serializers.Serializer):
            field = CustomField(source='*', allow_null=True)

        self.Serializer = NestedBaseSerializer
        self.NullableNestedSerializer = NullableNestedSerializer
        self.NullableFieldSerializer = NullableFieldSerializer
    Tests for `source='*'` argument, which is often used for complex field or
    nested representations.
  
  
  class TestStarredSource:
      """
    Tests for `source='*'` argument, which is often used for complex field or
    nested representations.
  
      For example:
  
          nested_field = NestedField(source='*')
      """
keep keep keep keep replace keep keep keep keep keep
 Fix nullable `source='*'` fields (#6659) 
tests/test_serializer.py