1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests.

This commit is contained in:
Simon Charette
2020-06-06 14:34:38 -04:00
committed by Mariusz Felisiak
parent 1e38f1191d
commit 156a2138db
7 changed files with 34 additions and 103 deletions

View File

@@ -841,7 +841,7 @@ class AggregateTestCase(TestCase):
Book.objects.aggregate(fail=F('price'))
def test_nonfield_annotation(self):
book = Book.objects.annotate(val=Max(Value(2, output_field=IntegerField()))).first()
book = Book.objects.annotate(val=Max(Value(2))).first()
self.assertEqual(book.val, 2)
book = Book.objects.annotate(val=Max(Value(2), output_field=IntegerField())).first()
self.assertEqual(book.val, 2)