MCPcopy
hub / github.com/django/django / test_basic

Method test_basic

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

Source from the content-addressed store, hash-verified

24 self.assertEqual(obj.json_object, {})
25
26 def test_basic(self):
27 obj = Author.objects.annotate(json_object=JSONObject(name="name")).first()
28 self.assertEqual(obj.json_object, {"name": "Ivan Ivanov"})
29
30 def test_expressions(self):
31 obj = Author.objects.annotate(

Callers

nothing calls this directly

Calls 3

JSONObjectClass · 0.90
firstMethod · 0.80
annotateMethod · 0.80

Tested by

no test coverage detected