mirror of https://github.com/django/django.git
Added assertions for cleaning None values for forms.JSONField and forms.UUIDField.
This commit is contained in:
parent
e6d77e6515
commit
997f87c5b0
|
@ -16,8 +16,8 @@ class JSONFieldTest(SimpleTestCase):
|
|||
|
||||
def test_valid_empty(self):
|
||||
field = JSONField(required=False)
|
||||
value = field.clean('')
|
||||
self.assertIsNone(value)
|
||||
self.assertIsNone(field.clean(''))
|
||||
self.assertIsNone(field.clean(None))
|
||||
|
||||
def test_invalid(self):
|
||||
field = JSONField()
|
||||
|
|
|
@ -19,8 +19,8 @@ class UUIDFieldTest(SimpleTestCase):
|
|||
|
||||
def test_uuidfield_2(self):
|
||||
field = UUIDField(required=False)
|
||||
value = field.clean('')
|
||||
self.assertIsNone(value)
|
||||
self.assertIsNone(field.clean(''))
|
||||
self.assertIsNone(field.clean(None))
|
||||
|
||||
def test_uuidfield_3(self):
|
||||
field = UUIDField()
|
||||
|
|
Loading…
Reference in New Issue