          assert serializer.validated_data == {'archived': False}
  
  
  class TestHTMLInput:
      def test_empty_html_charfield(self):
          class TestSerializer(serializers.Serializer):
              message = serializers.CharField(default='happy')
  
          serializer = TestSerializer(data=QueryDict(''))
          assert serializer.is_valid()
 
</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_with_default(self):
          assert serializer.validated_data == {'archived': False}
  
  
  class TestHTMLInput:
    def test_empty_html_charfield_with_default(self):
          class TestSerializer(serializers.Serializer):
              message = serializers.CharField(default='happy')
  
          serializer = TestSerializer(data=QueryDict(''))
          assert serializer.is_valid()
keep keep keep keep replace keep keep keep keep keep
 Resolve empty HTML charfield behavior. Closes #3318. 
tests/test_fields.py