diff options
author | sage <laymonage@gmail.com> | 2020-11-18 11:50:06 +0700 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-11-25 14:51:35 +0100 |
commit | fe6e5824218bab7cf47dee112d68325b338f9947 (patch) | |
tree | bf1685c4795a2645362d51da334495839249f434 /tests/model_fields | |
parent | 7408c4cd157ae18971302a2baf7aacce7c204a09 (diff) | |
download | django-fe6e5824218bab7cf47dee112d68325b338f9947.tar.gz |
Fixed #32203 -- Fixed QuerySet.values()/values_list() crash on key transforms with non-string values on SQLite.
Thanks Gordon Wrigley for the report.
Diffstat (limited to 'tests/model_fields')
-rw-r--r-- | tests/model_fields/test_jsonfield.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/model_fields/test_jsonfield.py b/tests/model_fields/test_jsonfield.py index 23479b4c0d..c1bacbe750 100644 --- a/tests/model_fields/test_jsonfield.py +++ b/tests/model_fields/test_jsonfield.py @@ -277,6 +277,7 @@ class TestQuerying(TestCase): 'k': {'l': 'm'}, 'n': [None], 'o': '"quoted"', + 'p': 4.2, }, [1, [2]], {'k': True, 'l': False, 'foo': 'bax'}, @@ -753,10 +754,14 @@ class TestQuerying(TestCase): qs = NullableJSONModel.objects.filter(value__h=True) tests = [ ('value__a', 'b'), + ('value__c', 14), ('value__d', ['e', {'f': 'g'}]), + ('value__h', True), + ('value__i', False), ('value__j', None), ('value__k', {'l': 'm'}), ('value__n', [None]), + ('value__p', 4.2), ] for lookup, expected in tests: with self.subTest(lookup=lookup): |