Refs #35381 -- Made JSONNull deconstruct using convenient import path.

This commit is contained in:
Clifford Gama 2025-11-09 11:32:25 +02:00 committed by Jacob Walls
parent a1ce852e52
commit 66b5a6de78
2 changed files with 9 additions and 0 deletions

View file

@ -1265,6 +1265,13 @@ class JSONNullTests(TestCase):
def test_repr(self):
self.assertEqual(repr(JSONNull()), "JSONNull()")
def test_deconstruct(self):
jsonnull = JSONNull()
path, args, kwargs = jsonnull.deconstruct()
self.assertEqual(path, "django.db.models.JSONNull")
self.assertEqual(args, ())
self.assertEqual(kwargs, {})
def test_save_load(self):
obj = JSONModel(value=JSONNull())
obj.save()