コード例 #1
0
ファイル: test_views.py プロジェクト: rocketsroger/socorro
 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])
コード例 #2
0
ファイル: test_views.py プロジェクト: rocketsroger/socorro
 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([])