Refs #31936 -- Added tests for __in lookup on JSONField key transforms with booleans.

This commit is contained in:
Mariusz Felisiak 2021-03-04 11:38:50 +01:00
parent 562898034f
commit 037607ff19
1 changed files with 2 additions and 0 deletions

View File

@ -779,6 +779,8 @@ class TestQuerying(TestCase):
('value__bar__in', [['foo', 'bar']], [self.objs[7]]), ('value__bar__in', [['foo', 'bar']], [self.objs[7]]),
('value__bar__in', [['foo', 'bar'], ['a']], [self.objs[7]]), ('value__bar__in', [['foo', 'bar'], ['a']], [self.objs[7]]),
('value__bax__in', [{'foo': 'bar'}, {'a': 'b'}], [self.objs[7]]), ('value__bax__in', [{'foo': 'bar'}, {'a': 'b'}], [self.objs[7]]),
('value__h__in', [True, 'foo'], [self.objs[4]]),
('value__i__in', [False, 'foo'], [self.objs[4]]),
] ]
for lookup, value, expected in tests: for lookup, value, expected in tests:
with self.subTest(lookup=lookup, value=value): with self.subTest(lookup=lookup, value=value):