MCPcopy
hub / github.com/django/django / test_empty

Method test_empty

tests/db_functions/json/test_json_object.py:22–24  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 )
21
22 def test_empty(self):
23 obj = Author.objects.annotate(json_object=JSONObject()).first()
24 self.assertEqual(obj.json_object, {})
25
26 def test_basic(self):
27 obj = Author.objects.annotate(json_object=JSONObject(name="name")).first()

Callers

nothing calls this directly

Calls 3

JSONObjectClass · 0.90
firstMethod · 0.80
annotateMethod · 0.80

Tested by

no test coverage detected