Added assertions for cleaning None values for forms.JSONField and forms.UUIDField.

This commit is contained in:
David Smith 2020-09-25 10:00:05 +02:00 committed by Mariusz Felisiak
parent e6d77e6515
commit 997f87c5b0
2 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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()