          serializer = TestSerializer(data=QueryDict(''))
          assert serializer.is_valid()
          assert serializer.validated_data == {'message': 'happy'}
  
      def test_empty_html_integerfield(self):
          class TestSerializer(serializers.Serializer):
              message = serializers.IntegerField(default=123)
  
          serializer = TestSerializer(data=QueryDict('message='))
          assert serializer.is_valid()
 
</s> remove     def test_empty_html_charfield(self):
 </s> add     def test_empty_html_charfield_with_default(self): </s> remove             elif ret == '' and self.default:
                return empty
 </s> add             elif ret == '' and not self.required:
                # If the field is blank, and emptyness is valid then
                # determine if we should use emptyness instead.
                return '' if getattr(self, 'allow_blank', False) else empty
    def test_empty_html_charfield_without_default(self):
        class TestSerializer(serializers.Serializer):
            message = serializers.CharField(allow_blank=True)

        serializer = TestSerializer(data=QueryDict('message='))
        assert serializer.is_valid()
        assert serializer.validated_data == {'message': ''}

    def test_empty_html_charfield_without_default_not_required(self):
        class TestSerializer(serializers.Serializer):
            message = serializers.CharField(allow_blank=True, required=False)

        serializer = TestSerializer(data=QueryDict('message='))
        assert serializer.is_valid()
        assert serializer.validated_data == {'message': ''}

          serializer = TestSerializer(data=QueryDict(''))
          assert serializer.is_valid()
          assert serializer.validated_data == {'message': 'happy'}
  
    def test_empty_html_charfield_without_default(self):
        class TestSerializer(serializers.Serializer):
            message = serializers.CharField(allow_blank=True)

        serializer = TestSerializer(data=QueryDict('message='))
        assert serializer.is_valid()
        assert serializer.validated_data == {'message': ''}

    def test_empty_html_charfield_without_default_not_required(self):
        class TestSerializer(serializers.Serializer):
            message = serializers.CharField(allow_blank=True, required=False)

        serializer = TestSerializer(data=QueryDict('message='))
        assert serializer.is_valid()
        assert serializer.validated_data == {'message': ''}

      def test_empty_html_integerfield(self):
          class TestSerializer(serializers.Serializer):
              message = serializers.IntegerField(default=123)
  
          serializer = TestSerializer(data=QueryDict('message='))
          assert serializer.is_valid()
keep keep keep add keep keep keep keep keep keep
 Resolve empty HTML charfield behavior. Closes #3318. 
tests/test_fields.py