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

Method test_empty

tests/db_functions/json/test_json_array.py:19–21  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17 Author.objects.create(name="Ivan Ivanov", alias="iivanov")
18
19 def test_empty(self):
20 obj = Author.objects.annotate(json_array=JSONArray()).first()
21 self.assertEqual(obj.json_array, [])
22
23 def test_basic(self):
24 obj = Author.objects.annotate(

Callers

nothing calls this directly

Calls 3

JSONArrayClass · 0.90
firstMethod · 0.80
annotateMethod · 0.80

Tested by

no test coverage detected