(self)
| 85 | ) |
| 86 | |
| 87 | def test_textfield(self): |
| 88 | Article.objects.create( |
| 89 | title="The Title", |
| 90 | text="x" * 4000, |
| 91 | written=timezone.now(), |
| 92 | ) |
| 93 | obj = Article.objects.annotate(json_object=JSONObject(text=F("text"))).first() |
| 94 | self.assertEqual(obj.json_object, {"text": "x" * 4000}) |
| 95 | |
| 96 | def test_order_by_key(self): |
| 97 | qs = Author.objects.annotate(attrs=JSONObject(alias=F("alias"))).order_by( |