diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-04 20:41:03 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-23 08:27:14 +0100 |
commit | c4df8b86c7fac52d95eda3440edc397fc13c3e56 (patch) | |
tree | f0f6b8be0eeca7aec4b3ff2aa37e1f208cafd4c8 /tests/model_fields | |
parent | 037607ff192cc924a282f08390c69cef83aa47a5 (diff) | |
download | django-c4df8b86c7fac52d95eda3440edc397fc13c3e56.tar.gz |
Refs #32483 -- Added tests QuerySet.values()/values_list() on key transforms with structures containing booleans.
Diffstat (limited to 'tests/model_fields')
-rw-r--r-- | tests/model_fields/test_jsonfield.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/model_fields/test_jsonfield.py b/tests/model_fields/test_jsonfield.py index 4fc243945a..c903074e70 100644 --- a/tests/model_fields/test_jsonfield.py +++ b/tests/model_fields/test_jsonfield.py @@ -277,9 +277,10 @@ class TestQuerying(TestCase): 'i': False, 'j': None, 'k': {'l': 'm'}, - 'n': [None], + 'n': [None, True, False], 'o': '"quoted"', 'p': 4.2, + 'r': {'s': True, 't': False}, }, [1, [2]], {'k': True, 'l': False, 'foo': 'bax'}, @@ -538,7 +539,7 @@ class TestQuerying(TestCase): ([1, [2]], [self.objs[5]]), ([1], [self.objs[5]]), ([[2]], [self.objs[5]]), - ({'n': [None]}, [self.objs[4]]), + ({'n': [None, True, False]}, [self.objs[4]]), ({'j': None}, [self.objs[4]]), ] for value, expected in tests: @@ -799,8 +800,9 @@ class TestQuerying(TestCase): ('value__i', False), ('value__j', None), ('value__k', {'l': 'm'}), - ('value__n', [None]), + ('value__n', [None, True, False]), ('value__p', 4.2), + ('value__r', {'s': True, 't': False}), ] for lookup, expected in tests: with self.subTest(lookup=lookup): |