[2.2.x] Fixed test_json.TestQuerying.test_key_transform_expression() on Python 3.5.

This commit is contained in:
Mariusz Felisiak 2019-08-15 19:38:12 +02:00 committed by GitHub
parent c2732e6839
commit 6624a3de28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ class TestQuerying(PostgreSQLTestCase):
self.assertSequenceEqual(
JSONModel.objects.filter(field__d__0__isnull=False).annotate(
key=KeyTransform('d', 'field'),
).annotate(
chain=KeyTransform('0', 'key'),
expr=KeyTransform('0', Cast('key', JSONField())),
).filter(chain=F('expr')),