1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #16731 -- Made pattern lookups work properly with F() expressions

This commit is contained in:
Thomas Chaumeny
2014-09-27 12:41:54 +02:00
committed by Anssi Kääriäinen
parent f39b0421b4
commit 6b5d82749c
8 changed files with 163 additions and 19 deletions

View File

@@ -286,6 +286,9 @@ class BilateralTransformTests(TestCase):
self.assertQuerysetEqual(
Author.objects.filter(name__upper='doe'),
["<Author: Doe>", "<Author: doe>"], ordered=False)
self.assertQuerysetEqual(
Author.objects.filter(name__upper__contains='f'),
["<Author: Foo>"], ordered=False)
finally:
models.CharField._unregister_lookup(UpperBilateralTransform)