          assert exc_info.value.detail == ['This field may not be blank.']
  
  
  class TestEmailField(FieldValues):
      """
      Valid and invalid values for `EmailField`.
      """
 
</s> remove         'min_length': _('Ensure this field has at least {min_length} characters.')
 </s> add         'min_length': _('Ensure this field has at least {min_length} characters.'), </s> remove     MinValueValidator, unicode_repr, unicode_to_repr
 </s> add     MinValueValidator, ProhibitNullCharactersValidator, unicode_repr,
    unicode_to_repr
    @pytest.mark.skipif(ProhibitNullCharactersValidator is None, reason="Skipped on Django < 2.0")
    def test_null_bytes(self):
        field = serializers.CharField()

        for value in ('\0', 'foo\0', '\0foo', 'foo\0foo'):
            with pytest.raises(serializers.ValidationError) as exc_info:
                field.run_validation(value)
            assert exc_info.value.detail == [
                'Null characters are not allowed.'
            ]

          assert exc_info.value.detail == ['This field may not be blank.']
  
    @pytest.mark.skipif(ProhibitNullCharactersValidator is None, reason="Skipped on Django < 2.0")
    def test_null_bytes(self):
        field = serializers.CharField()

        for value in ('\0', 'foo\0', '\0foo', 'foo\0foo'):
            with pytest.raises(serializers.ValidationError) as exc_info:
                field.run_validation(value)
            assert exc_info.value.detail == [
                'Null characters are not allowed.'
            ]

  
  class TestEmailField(FieldValues):
      """
      Valid and invalid values for `EmailField`.
      """
keep add keep keep keep keep keep
 Prohibit null characters in CharField by default (#6073)

* Implement an allow_null_bytes argument to CharField (default True)
* Switch to using native ProhibitNullCharactersValidator instead 
tests/test_fields.py