Exemple #1
0
 def test_null_arg(self):
     """A embedded null character is a validation error."""
     field = MultipleStringField()
     value = "Embeded_Null_\x00"
     with pytest.raises(ValidationError):
         field.clean([value])
Exemple #2
0
 def test_empty_list_required(self):
     """If a field is required, an empty list is a validation error."""
     field = MultipleStringField()
     with pytest.raises(ValidationError):
         field.clean([])