mirror of https://github.com/django/django.git
Refs #32483 -- Added tests QuerySet.values()/values_list() on key transforms with structures containing booleans.
This commit is contained in:
parent
037607ff19
commit
c4df8b86c7
|
@ -277,9 +277,10 @@ class TestQuerying(TestCase):
|
||||||
'i': False,
|
'i': False,
|
||||||
'j': None,
|
'j': None,
|
||||||
'k': {'l': 'm'},
|
'k': {'l': 'm'},
|
||||||
'n': [None],
|
'n': [None, True, False],
|
||||||
'o': '"quoted"',
|
'o': '"quoted"',
|
||||||
'p': 4.2,
|
'p': 4.2,
|
||||||
|
'r': {'s': True, 't': False},
|
||||||
},
|
},
|
||||||
[1, [2]],
|
[1, [2]],
|
||||||
{'k': True, 'l': False, 'foo': 'bax'},
|
{'k': True, 'l': False, 'foo': 'bax'},
|
||||||
|
@ -538,7 +539,7 @@ class TestQuerying(TestCase):
|
||||||
([1, [2]], [self.objs[5]]),
|
([1, [2]], [self.objs[5]]),
|
||||||
([1], [self.objs[5]]),
|
([1], [self.objs[5]]),
|
||||||
([[2]], [self.objs[5]]),
|
([[2]], [self.objs[5]]),
|
||||||
({'n': [None]}, [self.objs[4]]),
|
({'n': [None, True, False]}, [self.objs[4]]),
|
||||||
({'j': None}, [self.objs[4]]),
|
({'j': None}, [self.objs[4]]),
|
||||||
]
|
]
|
||||||
for value, expected in tests:
|
for value, expected in tests:
|
||||||
|
@ -799,8 +800,9 @@ class TestQuerying(TestCase):
|
||||||
('value__i', False),
|
('value__i', False),
|
||||||
('value__j', None),
|
('value__j', None),
|
||||||
('value__k', {'l': 'm'}),
|
('value__k', {'l': 'm'}),
|
||||||
('value__n', [None]),
|
('value__n', [None, True, False]),
|
||||||
('value__p', 4.2),
|
('value__p', 4.2),
|
||||||
|
('value__r', {'s': True, 't': False}),
|
||||||
]
|
]
|
||||||
for lookup, expected in tests:
|
for lookup, expected in tests:
|
||||||
with self.subTest(lookup=lookup):
|
with self.subTest(lookup=lookup):
|
||||||
|
|
Loading…
Reference in New Issue