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)