summaryrefslogtreecommitdiff
path: root/tests/annotations
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-05-06 10:56:28 -0400
committerTim Graham <timograham@gmail.com>2018-03-20 12:10:10 -0400
commit5fa4f40f45fcdbb7e48489ed3039a314b5c961d0 (patch)
tree272b8798d2c2a054f56d8613a42453bce30f92c0 /tests/annotations
parent73f7d1755ff1da3aac687c7b046e4b5028e505db (diff)
Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
Diffstat (limited to 'tests/annotations')
-rw-r--r--tests/annotations/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/annotations/tests.py b/tests/annotations/tests.py
index d7759c8552..f7f8474329 100644
--- a/tests/annotations/tests.py
+++ b/tests/annotations/tests.py
@@ -521,13 +521,15 @@ class NonAggregateAnnotationTestCase(TestCase):
books = Book.objects.annotate(
is_book=Value(True, output_field=BooleanField()),
is_pony=Value(False, output_field=BooleanField()),
- is_none=Value(None, output_field=NullBooleanField()),
+ is_none=Value(None, output_field=BooleanField(null=True)),
+ is_none_old=Value(None, output_field=NullBooleanField()),
)
self.assertGreater(len(books), 0)
for book in books:
self.assertIs(book.is_book, True)
self.assertIs(book.is_pony, False)
self.assertIsNone(book.is_none)
+ self.assertIsNone(book.is_none_old)
def test_annotation_in_f_grouped_by_annotation(self):
qs = (