  
          assert 'method call failed' in str(exc_info.value)
  
  
  class TestReadOnly:
      def setup(self):
          class TestSerializer(serializers.Serializer):
 
</s> remove from rest_framework.fields import DjangoImageField, is_simple_callable
 </s> add from rest_framework.fields import (
    BuiltinSignatureError, DjangoImageField, is_simple_callable
)
    def test_builtin_callable_source_raises(self):
        class BuiltinSerializer(serializers.Serializer):
            date = serializers.ReadOnlyField(source='timestamp.date')

        with pytest.raises(BuiltinSignatureError) as exc_info:
            BuiltinSerializer({'timestamp': datetime.datetime.now()}).data

        assert str(exc_info.value) == (
            'Field source for `BuiltinSerializer.date` maps to a built-in '
            'function type and is invalid. Define a property or method on '
            'the `dict` instance that wraps the call to the built-in function.')

  
          assert 'method call failed' in str(exc_info.value)
  
    def test_builtin_callable_source_raises(self):
        class BuiltinSerializer(serializers.Serializer):
            date = serializers.ReadOnlyField(source='timestamp.date')

        with pytest.raises(BuiltinSignatureError) as exc_info:
            BuiltinSerializer({'timestamp': datetime.datetime.now()}).data

        assert str(exc_info.value) == (
            'Field source for `BuiltinSerializer.date` maps to a built-in '
            'function type and is invalid. Define a property or method on '
            'the `dict` instance that wraps the call to the built-in function.')

  
  class TestReadOnly:
      def setup(self):
          class TestSerializer(serializers.Serializer):
keep keep add keep keep keep keep
 Raise exception when field source is a built-in (#6766) 
tests/test_fields.py