MCPcopy
hub / github.com/django/django / test_null

Method test_null

tests/model_fields/test_jsonfield.py:232–236  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

230@skipUnlessDBFeature("supports_json_field")
231class TestSaveLoad(TestCase):
232 def test_null(self):
233 obj = NullableJSONModel(value=None)
234 obj.save()
235 obj.refresh_from_db()
236 self.assertIsNone(obj.value)
237
238 @skipUnlessDBFeature("supports_primitives_in_json_field")
239 # RemovedInDjango70Warning.

Callers

nothing calls this directly

Calls 3

NullableJSONModelClass · 0.85
saveMethod · 0.45
refresh_from_dbMethod · 0.45

Tested by

no test coverage detected